Responses
OpenAI Responses API format.
POST /v1/responses
The OpenAI Responses API format endpoint. This is designed for output-focused generation where you provide input and optional instructions, and receive a structured response.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model ID to use. |
input | string/array | Yes | The input text or array of content parts. |
instructions | string | No | System-level instructions for the model. |
temperature | number | No | Sampling temperature between 0 and 2. |
max_output_tokens | integer | No | Maximum number of tokens in the response. |
top_p | number | No | Nucleus sampling parameter. |
stream | boolean | No | If true, response is streamed. |
Example Requests#
cURL#
curl https://ai.pofano.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-4o",
"input": "Explain quantum computing in simple terms.",
"instructions": "You are a science educator. Keep explanations beginner-friendly.",
"temperature": 0.7,
"max_output_tokens": 512
}'Python#
import requests
response = requests.post(
"https://ai.pofano.com/v1/responses",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "gpt-4o",
"input": "Explain quantum computing in simple terms.",
"instructions": "You are a science educator. Keep explanations beginner-friendly.",
"temperature": 0.7,
"max_output_tokens": 512
}
)
print(response.json())JavaScript#
const response = await fetch("https://ai.pofano.com/v1/responses", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "gpt-4o",
input: "Explain quantum computing in simple terms.",
instructions: "You are a science educator. Keep explanations beginner-friendly.",
temperature: 0.7,
max_output_tokens: 512
})
});
const data = await response.json();
console.log(data);
Pofano