Create a response (OpenAI Responses API)
POST
/responses
const url = 'https://api.saygm.com/v1/responses';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', '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 https://api.saygm.com/v1/responses \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'OpenAI-compatible Responses API. Use the OpenAI SDK with base_url set to https://api.saygm.com/v1; the request and response bodies match the OpenAI Responses schema.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
Examplegenerated
{}Responses
Section titled “Responses”An OpenAI Responses object, or a text/event-stream when stream is true.
object
Examplegenerated
{}string
Invalid request (e.g. unknown model).
Media typeapplication/json
object
error
object
message
string
type
string
code
string | null
Examplegenerated
{ "error": { "message": "example", "type": "example", "code": "example" }}