curl --request POST \
--url https://www.anyfast.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4.1-flash",
"messages": [
{
"role": "user",
"content": "Explain how a B-tree index accelerates database queries."
}
],
"max_tokens": 1024
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 123,
"model": "deepseek-v4.1-flash",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123
},
"prompt_cache_hit_tokens": 123,
"prompt_cache_miss_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}DeepSeek
deepseek-v4.1-flash
Creates a text response from text or image input using DeepSeek V4.1 Flash.
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://www.anyfast.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4.1-flash",
"messages": [
{
"role": "user",
"content": "Explain how a B-tree index accelerates database queries."
}
],
"max_tokens": 1024
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 123,
"model": "deepseek-v4.1-flash",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123
},
"prompt_cache_hit_tokens": 123,
"prompt_cache_miss_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Authorizations
Body
application/json
Response
Chat completion created
Was this page helpful?