# Create a response

> `POST /v1/responses` accepts the OpenAI Responses format and runs it through the same models and billing as chat completions.

Source: https://www.lyber.ai/docs/api/responses/ · Markdown: https://www.lyber.ai/docs/md/api/responses.md

> **Preview:** The Responses adapter is in preview. Chat Completions is the primary, fully supported format.

Python (`main.py`):

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://lyber-paid-acceptance-gateway-production.up.railway.app/v1",
    api_key=os.environ["LYBER_API_KEY"],
)

response = client.responses.create(
    model="minimax-m3.1-flash-abliterated",
    instructions="Answer in one paragraph.",
    input="Explain abliteration.",
    max_output_tokens=1024,
    reasoning={"effort": "low"},
)
print(response.output_text)
```

curl (`request.sh`):

```bash
curl https://lyber-paid-acceptance-gateway-production.up.railway.app/v1/responses \
  -H "Authorization: Bearer $LYBER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m3.1-flash-abliterated",
    "instructions": "Answer in one paragraph.",
    "input": "Explain abliteration.",
    "max_output_tokens": 1024
  }'
```

## Stateless

Lyber stores nothing between requests. Send the full conversation in `input` every time: `previous_response_id` and `store: true` return `400`. Reasoning items from earlier turns can be sent back as returned.

## What it supports

| Feature | Support |
| --- | --- |
| Text and `input_image` inputs | Yes. `file_id` references are not supported. |
| Function tools | Yes, including streamed argument deltas. |
| Hosted tools (web search, file search, code interpreter) | No. They are dropped from `tools`. |
| `reasoning.effort` | Yes, mapped to `reasoning_effort`. Reasoning comes back as a `reasoning` item with `reasoning_text` content. |
| `text.format` | Plain text only. |
| Streaming | Yes, with usage in the final event. |
| Spending ceiling | $1 per request by default; send `max_cost_micro_usdc` to change it. |
