# OpenAI-compatible API

Point Cursor, Continue, Aider, LiteLLM, or any OpenAI SDK at OneOver.

**Base URL:** `https://api.oneover.com/functions/v1/openai-v1`

**API key:** your `oo_live_…` secret.

Supported:

- `POST /chat/completions` (OpenAI SSE chunks, `[DONE]`, tool calls, and token usage)
- `GET /models`
- `POST /images/generations`
- `POST /responses`

Stable aliases: `oneover-code`, `oneover-fast`, `oneover-image`, `oneover-video`. Exact catalog ids stay pinnable. Unknown ids are rejected.

This can back Cursor Agent chat when Cursor is pointed at the OpenAI-compatible base URL. It does not replace Cursor Tab, Cursor Router, Cloud Agent inference, or the Cursor SDK catalog. Use the OneOver MCP server when Cursor should call OneOver tools while keeping its own model. See `docs/developers/agent-platform.md`.

## Cursor

1. Settings → Models → OpenAI API Key → paste `oo_live_…`
2. Override OpenAI Base URL to `https://api.oneover.com/functions/v1/openai-v1`
3. Pick a model id from `GET api-v1-models` (for example `gpt-5.6-sol`)

## Python

```python
from openai import OpenAI
client = OpenAI(
    api_key="oo_live_YOUR_KEY",
    base_url="https://api.oneover.com/functions/v1/openai-v1",
)
print(client.chat.completions.create(
    model="gpt-5.6-sol",
    messages=[{"role": "user", "content": "Hello"}],
))
```

Usage is billed to OneOver credits. A 402 includes `checkout_url`.
