Text Generation (Responses)
Generate text and call tools with the OpenAI Responses format
POST
https://api.tokenbyte.ai/v1/responsesUse Bearer authentication and Content-Type: application/json.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Full model ID supporting Responses |
input | string/array | Yes | Plain text or structured input items |
instructions | string | No | System-level instruction |
previous_response_id | string | No | Continue from a stored response |
stream, store | boolean | No | Streaming and persistence controls |
tools, tool_choice | array/object | No | Tools and selection policy |
temperature, top_p | number | No | Sampling controls |
reasoning | object | No | Reasoning effort when supported |
The output array can contain messages, reasoning, and tool calls. Read text from output_text content items rather than assuming the first output item is text. Streaming emits semantic events such as response.output_text.delta and response.completed.