跳到导航

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.
modelstring必需

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 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