curl --request POST \
--url https://api.poyo.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.2",
"input": "Write a product tagline in one sentence.",
"max_output_tokens": 120
}
'{
"code": 200,
"data": {
"id": "resp_9876543210",
"object": "response",
"created_at": 1677652288,
"status": "completed",
"model": "gpt-5.2",
"output": [
{
"id": "msg_123",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Launch faster with a smarter AI workspace built for teams."
}
]
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 14,
"total_tokens": 26
}
}
}Responses API
OpenAI-compatible Responses API for text, multimodal input, tools, and streaming
curl --request POST \
--url https://api.poyo.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.2",
"input": "Write a product tagline in one sentence.",
"max_output_tokens": 120
}
'{
"code": 200,
"data": {
"id": "resp_9876543210",
"object": "response",
"created_at": 1677652288,
"status": "completed",
"model": "gpt-5.2",
"output": [
{
"id": "msg_123",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Launch faster with a smarter AI workspace built for teams."
}
]
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 14,
"total_tokens": 26
}
}
}- OpenAI-compatible Responses API format
- Supports plain text input and structured multimodal input
- Supports tools such as web search and function calling when available on the selected model
- Supports both complete JSON responses and SSE streaming
Usage Examples
Basic Text
{
"model": "gpt-5.2",
"input": "Write a product tagline in one sentence.",
"max_output_tokens": 120
}
Multimodal Input
{
"model": "gpt-5",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Describe this image in one paragraph."
},
{
"type": "input_image",
"image_url": "https://example.com/image.jpg"
}
]
}
],
"max_output_tokens": 300
}
Web Search
{
"model": "gpt-5",
"input": "Use web search to find the latest product update on poyo.ai. Reply with the title and URL only.",
"tools": [
{
"type": "web_search_preview"
}
],
"tool_choice": "auto",
"max_output_tokens": 2000
}
Streaming
{
"model": "gpt-5.2",
"input": "Write a 100-word product introduction.",
"max_output_tokens": 200,
"stream": true,
"store": false
}
cURL
curl "https://api.poyo.ai/v1/responses" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer PoYo_API_KEY" \
-d '{
"model": "gpt-5.2",
"input": "Write a product tagline in one sentence.",
"max_output_tokens": 120
}'
Streaming
Whenstream is true, the endpoint returns text/event-stream. Events are sent as SSE data: lines and end with data: [DONE].
Common event types include:
response.createdresponse.output_item.addedresponse.output_text.deltaresponse.output_text.doneresponse.completedresponse.failed
Notes
- Tool availability depends on the selected model. If a model does not support a requested tool, the request may return an error.
- For image input, public URLs must be reachable by the model service.
- Base64 images must use the full Data URI prefix, for example
data:image/png;base64,. - Content block order can affect model understanding. Put text instructions before images when possible.
Authorizations
All API endpoints require Bearer Token authentication.
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer YOUR_API_KEY
Body
Model name.
"gpt-5.2"
Plain text input or an array of structured input items.
"Write a product tagline in one sentence."
System or developer instructions that guide the model response.
Tools available to the model. Tool support depends on the selected model.
Show child attributes
Show child attributes
Controls how the model selects tools.
"auto"
Maximum number of output tokens to generate.
x >= 1200
Legacy compatibility field for maximum output tokens.
x >= 1200
Whether to use streaming output in SSE format.
false
Whether the response should be stored when supported.
false
Reasoning configuration, when supported by the selected model.
{ "effort": "medium" }
Text output configuration, such as structured output format options when supported.
Custom metadata key-value pairs for your request.
Show child attributes
Show child attributes
Previous response ID for continuing a conversation.
Additional response fields to include, when supported.
Whether the model may call multiple tools in parallel.
Truncation behavior for long context, when supported.
"auto"
End-user identifier for abuse monitoring and request tracing.
Whether to run the response in background mode, when supported.
Service tier selection, when supported.
"auto"
Prompt object, when supported by the selected model.
Controls output randomness, range 0-2.
0 <= x <= 21
Nucleus sampling parameter, range 0-1.
0 <= x <= 11
