OpenAI Responses API
POSThttps://api.qiyaov.com/openai/responses
POSThttps://api.qiyaov.com/v1/responses

OpenAI Responses API, compatible with the official API format.

Agent integrations

Request Headers

acceptstring
Specify the response format returned by the server.
Please select
authorizationstring
Bearer token

Request Body

modelstringRequired parameter
Model ID to be used.
inputstring | arrayRequired parameter
List of messages that make up the current conversation.
typestringRequired parameter
Please select
typestringRequired parameter
Please select
typestringRequired parameter
Please select
toolsarray
An array of tools that can be called when the model generates a response. The tool to be used can be specified by setting the `tool_choice` parameter.
tool_choicestring | object
Controls whether and which tool the model may call.
parallel_tool_callsboolean
Please select
includearray
textobject
reasoningobject
storeboolean
Please select
streamboolean
If set to true, it will send partial messages incrementally like ChatGPT.
Please select
backgroundboolean
Is the model response running in the background?
Please select
stream_optionsobject
max_output_tokensinteger
max_tokensnumber
The maximum number of tokens that can be generated in dialogue completion.
nnumber
Generate how many dialogue completion options for each input message.
response_formatobject
An object in the format that the specified model must output. If not specified, the model will output in text form.
typestring
Must be one of `text` or `json_object`.
temperaturenumber
The sampling temperature used ranges from 0 to 2. Higher values (such as 0.8) will make the output more random, while lower values (such as 0.2) will make the output more focused and certain.

Response

Integration guide

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.

OpenAI generation
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.