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

# Base URL & Authentication

> The single endpoint and authentication format used by every Openference client.

# Base URL & Authentication

All traffic goes through one base URL:

```
https://api.openference.com/v1
```

## Full endpoint examples

| Purpose                 | URL                                               |
| ----------------------- | ------------------------------------------------- |
| Chat (OpenAI format)    | `https://api.openference.com/v1/chat/completions` |
| Chat (Anthropic format) | `https://api.openference.com/v1/messages`         |
| Responses API           | `https://api.openference.com/v1/responses`        |
| Embeddings              | `https://api.openference.com/v1/embeddings`       |
| List models             | `https://api.openference.com/v1/models`           |

## Authentication

Use HTTP Bearer token authentication.

```
Authorization: Bearer YOUR_API_KEY
```

* Keys are created in the dashboard.
* Each key is a long opaque string shown once at creation.
* Keys can be restricted to a subset of models.

### cURL

```bash theme={null}
-H "Authorization: Bearer YOUR_API_KEY"
```

### OpenAI SDK (Python / JS)

```python theme={null}
client = OpenAI(
    base_url="https://api.openference.com/v1",
    api_key="YOUR_API_KEY"
)
```

```ts theme={null}
const client = new OpenAI({
  baseURL: "https://api.openference.com/v1",
  apiKey: "YOUR_API_KEY",
});
```

## One key for everything

A single key works simultaneously across:

* Cursor, Claude Code, Codex CLI, OpenCode, Kilo CLI, Pi
* Cline and other VS Code extensions
* The official OpenAI Python and Node SDKs (and frameworks built on them)
* curl

You can also create separate keys per environment or tool for usage tracking. Unattended agents and automation tools require the [Auto Agent plan](https://openference.com/pricing).

## Model restrictions

When creating or editing a key you can limit which models it can access.

* The `GET /v1/models` response will only return allowed models for that key.
* Requests to disallowed models return 403.
* Leave the restriction empty to allow all active models.

## Next

* [Quickstart](/quickstart)
* [Client Integrations](/integrations/cursor)
* [API Keys & Security](/security/api-keys)
