responses-api
Create response
Creates a model response for the given input.
This endpoint implements the Open Responses compatible API, providing enhanced capabilities including:
- Reasoning models with controllable effort via reasoning parameter
- Stateful conversations via previous_response_id for maintaining context across turns
- Flexible input - accepts either a string or array of messages
- Text output configuration via text parameter for structured outputs
- Context window management via truncation parameter
Set stream: true to receive partial responses as server-sent events.
post/responses
Request body
Example request
{
"input": "What is a doubleword?",
"max_output_tokens": 256,
"model": "deepseek-ai/DeepSeek-V4-Pro",
"temperature": 0.7
}Response
Response generated successfully. When streaming, returns a series of SSE events.
Example response
{
"completed_at": 1703187205,
"created_at": 1703187200,
"id": "resp-abc123",
"model": "deepseek-ai/DeepSeek-V4-Pro",
"object": "response",
"output": [
{
"content": "A doubleword is a data unit that is twice the size of a standard word in computer architecture.",
"role": "assistant",
"type": "message"
}
],
"status": "completed",
"temperature": 0.7,
"top_p": 1,
"usage": {
"completion_tokens": 25,
"prompt_tokens": 10,
"total_tokens": 35
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.