Tool guides / cURL

DocsTool guidescURL

cURL

Call the API directly. Every format is served on the same domain and takes the same key.

Root URLhttps://intl.acctoken.com+ /v1https://intl.acctoken.com/v1Full paththe whole endpoint, e.g. https://intl.acctoken.com/v1/chat/completions

On this page
  1. Connection details
  2. Set it up
  3. Check it works
  4. 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.

01Connection details

CONNECTION RECORDCURL
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-flash
LIVE CHECKCommands run on the live APIEvery command on this page is run against intl.acctoken.com before it is published.ACCTOKEN DOCS DESK

02Set it up

Put the key in a variable once, so the commands below can use it:

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

FormatRequestKey header
Chat CompletionsPOST /v1/chat/completionsAuthorization: Bearer
ResponsesPOST /v1/responsesAuthorization: Bearer
Anthropic MessagesPOST /v1/messagesx-api-key and anthropic-version: 2023-06-01
GeminiPOST /v1beta/models/{model}:generateContentx-goog-api-key
EmbeddingsPOST /v1/embeddingsAuthorization: Bearer
RerankPOST /v1/rerankAuthorization: Bearer
ImagesPOST /v1/images/generationsAuthorization: Bearer
List modelsGET /v1/modelsAuthorization: Bearer

Examples

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."}]}'

Embeddings, rerank and images

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"}'
The vector is in data[0].embedding.

Add -i to any command to see the response headers, including X-Oneapi-Request-Id.

03Check 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.