Text Generation Overview
The text generation endpoint is fully compatible with the OpenAI Chat Completions API. The platform has integrated multiple mainstream large models. Each model family may have two calling styles:
- OpenAI-compatible format (recommended): uniformly use
/v1/chat/completions, only change themodelname - Native format (optional): some models also support their official native API format, such as Claude's
/v1/messagesor Gemini's/v1/models/{model}:generateContent
We recommend using the OpenAI-compatible format first, so switching models later requires no code changes.
Integrated Model Families
| Model Family | Description | Recommended Endpoint |
|---|---|---|
| OpenAI (GPT) | Full GPT-5.x series, o-series reasoning models | POST /v1/chat/completions |
| Claude | Claude Opus / Sonnet / Haiku series, native format supported | POST /v1/chat/completions or Anthropic native |
| Gemini | Google Gemini 2.5 / 3.x series, native format supported | POST /v1/chat/completions or Gemini native |
| DeepSeek | DeepSeek V4 Pro / Flash | POST /v1/chat/completions |
| Kimi (Moonshot) | Moonshot Kimi K3 | POST /v1/chat/completions |
| Zhipu AI (GLM) | Zhipu GLM series | POST /v1/chat/completions |
| Grok (xAI) | Grok 4.5 / 4.6, 500k context | POST /v1/chat/completions |
Generic Example
bash
curl $URL/v1/chat/completions \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Introduce yourself"}
],
"stream": false
}'Common Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name; see each family page for details |
messages | array | Yes | Conversation message list |
stream | boolean | No | Whether to stream the response, default false |
temperature | number | No | Sampling temperature 0–2 |
max_tokens | integer | No | Maximum tokens to generate |
top_p | number | No | Nucleus sampling |
Full parameters are consistent with the official OpenAI documentation.
