Call a model
Get an API key and connect to chat and video models.
Video generation guideChoose Seedance or another video model, create a task, and download the result.
Getting started
Your first chat request
Look up the model using the same API key you will call with, then replace MODEL_ID in the example.
- SDK Base URL
https://staging-dp.taotoken.io/v1- HTTP request path
POST /v1/chat/completions- Request headers
Authorization: Bearer API_KEYContent-Type: application/json
{
"model": "MODEL_ID",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}See complete request examples- SDK Base URL
https://staging-dp.taotoken.io/v1- HTTP request path
POST /v1/responses- Request headers
Authorization: Bearer API_KEYContent-Type: application/json
{
"model": "MODEL_ID",
"input": "Hello!"
}See complete request examples- SDK Base URL
https://staging-dp.taotoken.io- HTTP request path
POST /v1/messages- Request headers
Authorization: Bearer API_KEYanthropic-version: 2023-06-01Content-Type: application/json
{
"model": "MODEL_ID",
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}See complete request examples- SDK Base URL
https://staging-dp.taotoken.io/v1- HTTP request path
POST /v1/models/{model}:generateContent- Request headers
Authorization: Bearer API_KEYContent-Type: application/json
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello!"
}
]
}
]
}See complete request examples