Set up Doubao through the Ark API.

Connect Volcengine Ark with the correct inference base, an account-enabled model ID and a checked trial quota.

Doubao is the model family; Volcengine Ark is the API service. Ark documents an OpenAI-compatible Chat Completions endpoint, so many clients that accept a custom OpenAI API base can connect. This is a direct provider setup with your own Ark key; ChinaGenAI's separate free API routes models automatically and does not lock to Doubao.

Copy the inference API settings

For the standard China (Beijing) Ark inference API, the OpenAI-compatible base is:

API base URL
https://ark.cn-beijing.volces.com/api/v3
Chat Completions route
https://ark.cn-beijing.volces.com/api/v3/chat/completions
API key
Your own Ark API key, sent as a Bearer token
Model
The exact model or inference endpoint ID enabled for your Ark account

Enter the base URL when an app appends /chat/completions itself. If it asks for a complete endpoint, use the full route above. Do not use the Ark control-plane host as an inference base. Ark's Coding Plan has separate endpoints, so use its own current setup guide if that is the product on your account.

Use the model ID from your account

Ark's current OpenAI SDK example shows doubao-seed-2-1-pro-260915. Treat that as a dated example, not a promise that it is enabled for every account. Copy the exact model or endpoint ID displayed in Ark for your region and service. An ID that appears in a guide cannot grant account permission by itself.

Keep the provider key in your app's credential store or a local environment variable named ARK_API_KEY. Do not put it in a browser page or a checked-in config file.

Prepare a small Chat Completions request

Replace MODEL_ID_FROM_ARK_CONSOLE with the ID from your account. The example prepares a standard text request and does not execute it.

Ark Chat Completions cURL example
curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MODEL_ID_FROM_ARK_CONSOLE",
    "messages": [{"role": "user", "content": "Reply with one short sentence."}],
    "max_tokens": 64
  }'

Prepare the same request in the local builder. It fills the documented base URL and dated example ID but does not ask for your key or send a provider request.

Check whether your account has a free trial

Ark API inference is not unconditionally free. Its activation documentation describes per-model free quotas and a safe-experience mode for eligible new users who have not enabled a model service. The current guidance says that mode provides up to 500,000 free tokens and pauses requests as the free allowance nears exhaustion. Check the chosen model's remaining quota, account eligibility and activation or billing state in your own console; other features can have separate charges.

Read the Doubao access summary for the provider links and a dated note. “Free Doubao app” and “free API inference” are different access routes.

Read the result before relying on it

OpenAI-compatible describes the request format. Optional parameters and model features can still vary. Start with one short request, inspect the HTTP status and complete response, and check finish_reason for truncation. You can paste a saved JSON response into the local response inspector; it does not send the pasted response anywhere.

Official references

Ark OpenAI SDK compatibility
Ark inference base URL and API-key authentication
Ark model activation and safe-experience quota
Ark model pricing

Provider documentation checked 21 October 2026. Availability and quota are account-specific. No provider key or model request was used for this guide.

Free API access and limits

Check the site free API access and limits before trying to obtain a site key. Read the current status and request limits before using a site key. It is not a source of official provider keys.

ChinaGenAI is not affiliated with the providers named here. This release contains setup guidance and explicitly labeled fictional examples, not claimed live model benchmarks.