Documentation

Text Generation (Responses)

Generate text and call tools with the OpenAI Responses format

POSThttps://api.tokenbyte.ai/v1/responses

Use Bearer authentication and Content-Type: application/json.

Request body

FieldTypeRequiredDescription
modelstringYesFull model ID supporting Responses
inputstring/arrayYesPlain text or structured input items
instructionsstringNoSystem-level instruction
previous_response_idstringNoContinue from a stored response
stream, storebooleanNoStreaming and persistence controls
tools, tool_choicearray/objectNoTools and selection policy
temperature, top_pnumberNoSampling controls
reasoningobjectNoReasoning 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.