Skip to navigation

Responses

Creates a model response using the OpenAI-compatible Responses format. JoyToken currently supports text input, message input items, instructions, sampling limits, and function tools. Provider-hosted built-in tools (e.g. web_search, file_search) and previous_response_id continuation are not available on this gateway contract. This is unrelated to the client SDKs’ local default fallback tools, which run on the caller side.

Authentication

AuthorizationBearer

Use Authorization: Bearer $JOY_TOKEN_API_KEY.

Headers

X-Request-IDstringOptional
Optional request identifier for log, billing, and debugging correlation.

Request

This endpoint expects an object.
modelstringRequired

Use auto to let the gateway pick the model, or pass a concrete modelName from the model catalog to pin that model. Both ways are available to every account. When a model is pinned, tier is ignored, orchestration is not used, and there is no fallback to another model.

inputstring or list of objectsRequired
Text input or an array of message input items.
instructionsstringOptional

Optional system-level instructions.

streambooleanOptionalDefaults to false
max_output_tokensintegerOptional>=1
temperaturedoubleOptional
top_pdoubleOptional
toolslist of objectsOptional

Response

Successful Responses result.
idstring
objectenum
Allowed values:
statusstring
modelstring
outputlist of objects
usageobjectOptional
metadatamap from strings to anyOptional

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error