Quick start in 5 minutes
Create an account, add balance, create an API key, and send your first model request.
Run the first path first
You do not need to understand every API detail before your first call. Prepare account balance, a user API Key, Base URL, and a model name.
Quick start
Create an account and sign in
Open the console, then register or sign in with your existing account.
Make sure the account has balance
Model calls are charged by actual usage. If a new account has no available balance, recharge it or ask an administrator to add balance.
Create a user API Key
Create and copy a user API Key in the console. This key is your credential for DINGJIAI, not an upstream provider key.
Copy a model name
Copy an available public model name from the console. Use that value in the model field.
Send the first chat request
Start with the OpenAI-compatible Chat Completions path. A normal response means the key, balance, model, and route are basically correct.
curl https://dingjiai.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_USER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME_FROM_THE_CONSOLE",
"messages": [
{ "role": "user", "content": "Introduce yourself in one sentence" }
]
}'The 4 values to remember
Base URL: usuallyhttps://dingjiai.com; some tools ask for the full/v1URL.API Key: the user API Key created in the DINGJIAI console.Model name: copy it from the console instead of guessing.request_id: keep it when an error happens so the request can be traced.
Next
If you want to connect an existing tool, continue with the tool setup docs. If you are writing code, continue with the public API overview and current API contract.
Last updated on