Skip to main content
POST
/
v1
/
chat
/
completions
Chat Completion
curl --request POST \
  --url https://www.anyfast.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "qwen3.6-flash",
  "messages": [
    {
      "content": "<string>"
    }
  ],
  "max_completion_tokens": 65536,
  "temperature": 1,
  "top_p": 0.5,
  "frequency_penalty": 0,
  "presence_penalty": 0,
  "stream": false,
  "enable_thinking": false,
  "stop": [
    "<string>"
  ]
}
'
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 123,
  "model": "qwen3.6-flash",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?",
        "reasoning_content": "<string>"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "prompt_tokens_details": {
      "cached_tokens": 123,
      "text_tokens": 123,
      "image_tokens": 123,
      "video_tokens": 123
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model ID

Available options:
qwen3.6-flash
Example:

"qwen3.6-flash"

messages
object[]
required

A list of messages comprising the conversation so far. Content can be a string or an array of content parts for multi-modal input.

Minimum array length: 1
Examples:
{
"text-only": [{ "role": "user", "content": "Hello!" }]
}
{
"image-input": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image."
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/photo.jpg" }
}
]
}
]
}
{
"video-input": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Summarize this video."
},
{
"type": "video_url",
"video_url": { "url": "https://example.com/sample.mp4" }
}
]
}
]
}
max_completion_tokens
integer
default:65536

The maximum number of tokens to generate.

Required range: 1 <= x <= 65536
temperature
number
default:1

Sampling temperature. Higher values make output more random.

Required range: 0 <= x <= 2
Example:

1

top_p
number

Nucleus sampling threshold.

Required range: 0 <= x <= 1
frequency_penalty
number
default:0

Penalizes repeated tokens based on their frequency in the text so far.

Required range: -2 <= x <= 2
presence_penalty
number
default:0

Penalizes tokens that have already appeared in the text.

Required range: -2 <= x <= 2
stream
boolean
default:false

If true, stream partial message deltas using SSE.

enable_thinking
boolean
default:false

Enable reasoning capability. When true, returns reasoning_content alongside content.

stop
string[]

Sequences where the model will stop generating further tokens. Must be an array, e.g. [".", "?"]

Response

Completion generated successfully

id
string
required
Example:

"chatcmpl-abc123"

object
string
required
Example:

"chat.completion"

created
integer
required

Unix timestamp

model
string
required
Example:

"qwen3.6-flash"

choices
object[]
required
usage
object