Docs / Tool guides / cURL
cURL Call the API directly. Every format is served on the same domain and takes the same key.
Claude Code Anthropic format Root URL Codex Responses API + /v1 Cursor OpenAI format + /v1 Cline OpenAI format + /v1 Gemini CLI Gemini format Root URL OpenAI SDK OpenAI format + /v1 Anthropic SDK Anthropic format Root URL cURL Any format Full path Root URL https://intl.acctoken.com+ /v1 https://intl.acctoken.com/v1Full path the whole endpoint, e.g. https://intl.acctoken.com/v1/chat/completions
On this page Connection details Set it up Check it works Common problems Before you start
An ACCTOKEN API key. Create one on API Keys in the console. curl, which ships with macOS, Linux and Windows 10 or later. 01 Connection details CONNECTION RECORD CURL
Formats Chat Completions · Responses · Messages · Gemini Base URL https://intl.acctoken.comfull path API key YOUR_API_KEYBearer, x-api-key or x-goog-api-key Model deepseek-v4.1-flashLIVE CHECK Commands run on the live API9 Oct 2026 Every command on this page is run against intl.acctoken.com before it is published. ACCTOKEN DOCS DESK 02 Set it up Put the key in a variable once, so the commands below can use it:
macOS / Linux / Git Bash
Copy export ACCTOKEN_API_KEY = "YOUR_API_KEY "
On Windows, run these commands in Git Bash or WSL. For Windows PowerShell, see the PowerShell tab in Quickstart . Endpoints Format Request Key header Chat Completions POST /v1/chat/completionsAuthorization: BearerResponses POST /v1/responsesAuthorization: BearerAnthropic Messages POST /v1/messagesx-api-key and anthropic-version: 2023-06-01Gemini POST /v1beta/models/{model}:generateContentx-goog-api-keyEmbeddings POST /v1/embeddingsAuthorization: BearerRerank POST /v1/rerankAuthorization: BearerImages POST /v1/images/generationsAuthorization: BearerList models GET /v1/modelsAuthorization: Bearer
Examples Chat Completions Responses Messages Gemini Streaming
Copy curl https://intl.acctoken.com/v1/chat/completions \ -H "Authorization: Bearer $ACCTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "deepseek-v4.1-flash", "messages": [{"role": "user", "content": "Say hello in one word."}]}'
curl https://intl.acctoken.com/v1/responses \ -H "Authorization: Bearer $ACCTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "gpt-6.1-sol", "input": "Say hello in one word."}'
curl https://intl.acctoken.com/v1/messages \ -H "x-api-key: $ACCTOKEN_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{"model": "claude-sonnet-5", "max_tokens": 256, "messages": [{"role": "user", "content": "Say hello in one word."}]}'
curl "https://intl.acctoken.com/v1beta/models/gemini-3.8-flash:generateContent" \ -H "x-goog-api-key: $ACCTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"contents": [{"parts": [{"text": "Say hello in one word."}]}]}'
curl -N https://intl.acctoken.com/v1/chat/completions \ -H "Authorization: Bearer $ACCTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "deepseek-v4.1-flash", "stream": true, "messages": [{"role": "user", "content": "Count to five."}]}'
Embeddings, rerank and images Embeddings Rerank Images
Copy curl https://intl.acctoken.com/v1/embeddings \ -H "Authorization: Bearer $ACCTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "text-embedding-v4", "input": "hello"}'
curl https://intl.acctoken.com/v1/rerank \ -H "Authorization: Bearer $ACCTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "qwen3.7-text-rerank", "query": "fruit", "documents": ["apple", "truck"], "top_n": 2}'
curl https://intl.acctoken.com/v1/images/generations \ -H "Authorization: Bearer $ACCTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "z-image-turbo", "prompt": "A red apple on a white table, studio photo", "n": 1}'
The vector is in data[0].embedding. Add -i to any command to see the response headers, including X-Oneapi-Request-Id.
03 Check it works List the models your key can call:
curl https://intl.acctoken.com/v1/models -H "Authorization: Bearer $ACCTOKEN_API_KEY"
You should get JSON with a data list of model IDs.
Common problems 400 Model name not specified, model name cannot be empty
Add -H "Content-Type: application/json". Without it, curl -d sends form data and the body is not read as JSON.
400 Invalid request: Invalid request: invalid JSON request body
The JSON is broken. Keep it in single quotes and check commas and quotes.
404 Invalid URL (POST /v1/v1/chat/completions)
The path has /v1 twice.
An HTML page comes back
The path is missing /v1, so the request reached the website.
401 Invalid token
The variable is empty or holds the wrong key. Run echo $ACCTOKEN_API_KEY to check.
Something else? Look up the exact message in Errors .
Previous Anthropic SDK Next Model IDs