DocsTool guidesOpenAI SDK
OpenAI SDK
The official OpenAI libraries for Python and Node.js. Change the base URL to https://intl.acctoken.com/v1 and keep the rest.
Root URLhttps://intl.acctoken.com+ /v1https://intl.acctoken.com/v1Full paththe whole endpoint, e.g. https://intl.acctoken.com/v1/chat/completions
Before you start
- An ACCTOKEN API key. Create one on API Keys in the console.
- Python with
pip install openai, or Node.js withnpm install openai.
01Connection details
- Format
- Chat Completions, Responses
- Base URL
https://intl.acctoken.com/v1+ /v1- API key
YOUR_API_KEYapi_key/apiKey- Model
deepseek-v4.1-flash- Environment
OPENAI_BASE_URLOPENAI_API_KEY
02Set it up
Point the client at the /v1 base URL. The rest of your code stays as it is.
pip install openai.Responses API
The same client calls the Responses API. It works with GPT models and the DeepSeek, Qwen, GLM, Kimi, MiniMax and MiMo models.
Streaming
Pass stream=True in Python or stream: true in Node.js. Streaming works as in the OpenAI API; the last chunk carries usage even if you did not ask for it.
03Check it works
With the two environment variables set, run:
OKCommon problems
Unexpected token '<', or an HTML page
base_url is missing /v1.
Invalid URL (POST /v1/v1/chat/completions)
base_url has /v1 twice.
Invalid token
Check the key you pass, or OPENAI_API_KEY if you rely on the environment.
Insufficient balance: $0.00 remaining. New requests are declined until you add balance
Add balance in Wallet. These requests are not recorded in Usage Logs.
The request times out before the reply arrives
Some models, GPT models in particular, can take up to about three minutes to answer without streaming. If you set a timeout on the client, make it 300 seconds or more, or stream the response.
Something else? Look up the exact message in Errors.