v1

latestOpenAPI 3.0.32026-07-26451985.7 KB

chat

Use the latest AI chat models

post/models/v2/Qwen/Qwen3-4B

Request body

streamboolean

Enable text streaming.

Example request

{
  "messages": [
    {
      "role": "system",
      "content": "You are a friendly chatbot"
    },
    {
      "role": "assistant",
      "content": "Hello, I'm a friendly bot"
    },
    {
      "role": "user",
      "content": "Hello bot, what is the capital of England?"
    }
  ],
  "params": {
    "min_length": 10,
    "max_length": 100,
    "temperature": 0.5
  }
}

Response

Successful chat response.

errorstring nullable required

Null on success; otherwise an error message.

outputobject required

The output message generated by the model

Example response

{
  "output": {
    "role": "assistant",
    "content": "Aaaaaaaargh matey"
  }
}