> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifically.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses API

> OpenAI Responses-compatible API for all supported LLM models

The `/v1/responses` endpoint provides an **OpenAI Responses API-compatible** interface for text generation, tool use, and multi-turn conversations. Use the same request format as the OpenAI Responses API — swap the base URL to `https://api.unifically.com` and pass any supported model ID in the `model` field.

<Info>
  All [LLM models](/models/llm/overview) support this endpoint, including Cursor, OpenAI, and Anthropic models.
</Info>

## Create Response

**POST** `/v1/responses`

### Request

```bash theme={null}
curl -X POST https://api.unifically.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "openai/gpt-5.4",
    "input": "Write a haiku about programming."
  }'
```

### Request Parameters

<ParamField body="model" type="string" required>
  Model identifier in `provider/model-name` format. See [Available LLM Models](/models/llm/overview).
</ParamField>

<ParamField body="input" type="string | array" required>
  Text prompt, or an array of input items (messages, tool results, etc.) for multi-turn conversations.
</ParamField>

<ParamField body="instructions" type="string">
  System-level instructions for the model.
</ParamField>

<ParamField body="stream" type="boolean">
  If `true`, the response is streamed using server-sent events. Default: `false`.
</ParamField>

<ParamField body="temperature" type="number">
  Sampling temperature between `0` and `2`.
</ParamField>

<ParamField body="max_output_tokens" type="integer">
  Maximum number of output tokens to generate.
</ParamField>

<ParamField body="tools" type="array">
  Tools available to the model. Each tool includes a `type` and definition.
</ParamField>

<ParamField body="tool_choice" type="string | object">
  Controls tool usage: `none`, `auto`, `required`, or a specific tool.
</ParamField>

<ParamField body="previous_response_id" type="string">
  ID of a previous response to continue a multi-turn conversation.
</ParamField>

<ParamField body="store" type="boolean">
  Whether to store the response for later retrieval. Default: `true`.
</ParamField>

### Multi-turn Example

```bash theme={null}
curl -X POST https://api.unifically.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "anthropic/claude-opus-4-8",
    "instructions": "You are a concise technical writer.",
    "input": [
      {"role": "user", "content": "What is an API gateway?"},
      {"role": "assistant", "content": "An API gateway is a server that acts as an entry point for API requests..."},
      {"role": "user", "content": "Give me a shorter version."}
    ]
  }'
```

### Response

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "resp_abc123",
    "object": "response",
    "created_at": 1710000000,
    "model": "openai/gpt-5.4",
    "status": "completed",
    "output": [
      {
        "type": "message",
        "role": "assistant",
        "content": [
          {
            "type": "output_text",
            "text": "Code flows like rain\nBugs hide in silent logic\nCompile, then rejoice"
          }
        ]
      }
    ],
    "usage": {
      "input_tokens": 12,
      "output_tokens": 24,
      "total_tokens": 36
    }
  }
  ```
</ResponseExample>

### Streaming Response

When `stream: true`, the API returns server-sent events with partial response objects:

```bash theme={null}
curl -X POST https://api.unifically.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "cursor/composer-2.5",
    "input": "Explain recursion simply.",
    "stream": true
  }'
```

***

## Supported Models

| Model                         | Provider  |
| ----------------------------- | --------- |
| `cursor/composer-2.5`         | Cursor    |
| `cursor/composer-2.5-fast`    | Cursor    |
| `openai/gpt-5.4-mini`         | OpenAI    |
| `openai/gpt-5.4-nano`         | OpenAI    |
| `openai/gpt-5.4`              | OpenAI    |
| `openai/gpt-5.5`              | OpenAI    |
| `anthropic/claude-sonnet-4-6` | Anthropic |
| `anthropic/claude-opus-4-6`   | Anthropic |
| `anthropic/claude-opus-4-7`   | Anthropic |
| `anthropic/claude-opus-4-8`   | Anthropic |

See individual model pages under [LLM Models](/models/llm/overview) for details.

***

## SDK Compatibility

Point any OpenAI SDK at Unifically by changing the base URL:

```python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.unifically.com/v1"
)

response = client.responses.create(
    model="openai/gpt-5.5",
    input="Summarize REST APIs in two sentences."
)
print(response.output_text)
```
