Text Models
Responses
Call text models with an OpenAI Responses compatible API.
POST /v1/responses is for text models. Use a public model ID returned by GET /v1/models; use /v1/generations for image and video tasks.
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Public text model ID |
input | string or array | Yes | Current input or ordered multi-turn messages |
instructions | string | No | System-level instructions |
stream | boolean | No | Return SSE deltas; defaults to false |
reasoning | object | No | Reasoning configuration such as { "effort": "high" } |
System instructions
Do not send a custom systemPrompt field. Use top-level instructions:
{
"model": "gpt_5_6_luna",
"instructions": "Answer in Chinese and provide runnable code.",
"input": "Write a Python example."
}For multi-turn conversations, pass ordered messages in input:
{
"model": "gpt_5_6_luna",
"input": [
{ "role": "user", "content": "Write a crawler." },
{ "role": "assistant", "content": "Which language?" },
{ "role": "user", "content": "Python" }
]
}Streaming
Set stream to true to receive text/event-stream deltas:
data: {"type":"response.output_text.delta","delta":"Here is"}
data: {"type":"response.output_text.delta","delta":" a Python example."}
data: {"type":"response.completed"}Compact and WebSocket
POST /v1/responses/compactuses the Responses contract for compact-context requests.GET /v1/responsesis a WebSocket Upgrade entry point; a normal GET does not return a response.
Common errors
- Model not found or not authorized.
- No available route.
- Unsupported parameter.
- Insufficient balance.
- Upstream failure.