Responses API
Reference for POST /v1/responses.
Responses API
The Responses API provides an alternative interface based on the OpenAI Responses API format. It offers the same Forge routing, memory, and security capabilities as Chat Completions but uses a different request/response structure that is better suited for single-turn interactions and tool-use workflows.
Endpoint
POST /v1/responses
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID or "auto" |
input | string|array | Yes | Input text or array of input items |
instructions | string | No | System instructions |
tools | array | No | Tool definitions |
temperature | number | No | Sampling temperature |
max_output_tokens | integer | No | Maximum output tokens |
forge | object | No | Forge extensions (same as Chat Completions) |
Example Request
curl -X POST https://api.optima-forge.com/v1/responses \
-H "Authorization: Bearer $FORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"input": "Summarize the key features of Optima Forge.",
"instructions": "Be concise. Use bullet points.",
"max_output_tokens": 300
}'
Response Format
{
"id": "resp_abc123",
"object": "response",
"created_at": 1709000000,
"model": "claude-sonnet-4-20250514",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Key features of Optima Forge:\n- Intelligent multi-provider routing..."
}
]
}
],
"usage": {
"input_tokens": 18,
"output_tokens": 95,
"total_tokens": 113
}
}