Any tool, library, or application that supports the OpenAI API works with 元任务 AI 网关 without code changes beyond two settings: the base URL (Documentation Index
Fetch the complete documentation index at: https://docs.metask.ai/llms.txt
Use this file to discover all available pages before exploring further.
https://napi.origintask.cn/v1) and your gateway API key. This page shows the pattern for several popular clients so you can apply it to whatever tooling you already use.
curl (raw HTTP)
You can call the gateway directly withcurl to test your API key, inspect raw responses, or script one-off requests.
terminal
LangChain
LangChain’sChatOpenAI class accepts a custom base URL and API key, making it straightforward to swap in the gateway.
python
terminal
llm object as you normally would — the gateway is transparent to the rest of your LangChain code.
LlamaIndex
LlamaIndex’sOpenAI LLM class accepts the same api_base and api_key overrides:
python
terminal
General configuration pattern
Regardless of the client, the pattern is always the same:| Setting | Value |
|---|---|
| Base URL / API base | https://napi.origintask.cn/v1 |
| API key | Your 元任务 AI 网关 key |
| Model | Any identifier from Available Models |
Some clients validate the base URL by making a request to
/models on startup. The gateway supports this endpoint, so model listing will work as expected.