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.

身份验证

AuthorizationBearer

Use Authorization: Bearer $JOY_TOKEN_API_KEY.

请求头

X-Request-IDstring可选
Optional request identifier for log, billing, and debugging correlation.

请求

This endpoint expects an object.
modelenum必需

Must be auto. Concrete model IDs are not accepted.

inputstring or list of objects必需
Text input or an array of message input items.
instructionsstring可选

Optional system-level instructions.

streamboolean可选默认为 false
max_output_tokensinteger可选>=1
temperaturedouble可选
top_pdouble可选
toolslist of objects可选

响应

Successful Responses result.
idstring
objectenum
statusstring
modelstring
outputlist of objects
usageobject可选
metadatamap from strings to any可选

错误

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