---
title: "chat"
method: POST
path: "/models/v2/Qwen/Qwen3-4B"
---

# chat

`POST /models/v2/Qwen/Qwen3-4B`

Use the latest AI chat models

## Request body

- object
  - `messages` object[], required — Conversation history.
    - `role` 'system' | 'user' | 'assistant', required
    - `content` union, required
      - string
      - object[]
        - `type` 'text', required
        - `text` string, required
  - `stream` boolean — Enable text streaming.
  - `params` object — Model-specific parameters.
    - `min_length` integer — Minimum length of the generated text.
    - `max_length` integer — Maximum length of the generated text.
    - `temperature` number, float — Sampling temperature. Higher values = more random output.

## Response `200`

Successful chat response.

- object
  - `error` string, nullable, required — Null on success; otherwise an error message.
  - `output` object, required — The output message generated by the model

## Other responses

- `401` — Auth error - check your api key and how you're sending it.
- `429` — Too Many Requests – You have hit the rate limit.

---

[API](https://skmtc.net/bytez/apis/closed-source-model-api.md) · [All operations](https://skmtc.net/bytez/apis/closed-source-model-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bytez/closed-source-model-api/versions/d64c9c733afe/schema)
