POST
/v1/responses
const url = 'http://localhost:8000/v1/responses';const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/v1/responses \ --header 'Content-Type: application/json' \ --data '{}'The stateless subset of the Responses API: the body becomes a chat request (validate_responses_request) and
runs the chat path (_serve) with the same checks, task resolution, cascade, quota and storage; the answer comes
back as a response object. Ratchet keeps no response state, so what needs it (previous_response_id,
conversation, background) and stream are a 400 unsupported_parameter.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
Example generated
{}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Example generated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}