---
title: "Other APIs"
subtitle: "Media, embeddings, realtime, and passthrough endpoints, on the same base URL and key."
---

Every endpoint lives on `https://gateway.respan.ai` and takes your Respan API key: `Authorization: Bearer` for OpenAI-shaped endpoints, `x-api-key` for Anthropic's, `x-goog-api-key` for Google's. Each one is routed, billed, and logged like a chat request, and answers with `X-Respan-Log-Id`. Respan params work on all of them.

The main API formats have their own pages: [OpenAI Chat Completions](/docs/ai-gateway/requests/chat-completions), [OpenAI Responses](/docs/ai-gateway/requests/responses), [Anthropic Messages](/docs/ai-gateway/requests/anthropic-messages), [Google GenerateContent](/docs/ai-gateway/requests/gemini), and [TypeSafe Decisions](/docs/ai-gateway/modalities/decisions).

## Media

| Endpoint | Method and path | Billed per | Guide |
|---|---|---|---|
| Image generation | `POST /v1/images/generations` | Image | [Images](/docs/ai-gateway/modalities/images) |
| Image edits | `POST /v1/images/edits` | Image | [Images](/docs/ai-gateway/modalities/images) |
| Videos | `POST /v1/videos`, `GET /v1/videos/{id}`, `GET /v1/videos/{id}/content`, `POST /v1/videos/{id}/remix` | Second of video | [Video](/docs/ai-gateway/modalities/video) |
| Speech | `POST /v1/audio/speech` | Minute of audio | [Audio](/docs/ai-gateway/modalities/audio) |
| Transcriptions | `POST /v1/audio/transcriptions` | Minute of audio | [Audio](/docs/ai-gateway/modalities/audio) |

## Embeddings

| Endpoint | Method and path | Billed per | Guide |
|---|---|---|---|
| Embeddings | `POST /v1/embeddings` | Input token | [Embeddings](/docs/ai-gateway/modalities/embeddings) |

## Realtime

Realtime sessions run over WebSocket. Each session is billed and logged once it ends.

| Endpoint | URL | Guide |
|---|---|---|
| OpenAI Realtime | `wss://gateway.respan.ai/v1/realtime?model=...` | [Realtime](/docs/ai-gateway/modalities/realtime) |
| Gemini Live | `wss://gateway.respan.ai/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent?model=...` | [Realtime](/docs/ai-gateway/modalities/realtime) |
| Mistral realtime transcription | `wss://gateway.respan.ai/v1/audio/transcriptions/realtime?model=...` | [Realtime](/docs/ai-gateway/modalities/realtime) |

## OpenAI decisions

| Endpoint | Method and path | Guide |
|---|---|---|
| OpenAI decisions | `POST /openai/v1/decisions` | [Decisions](/docs/ai-gateway/modalities/decisions) |

The same decisions models answer OpenAI's decisions contract (`input`, ordered `questions` and `answers`) and Respan's System One contract.

## Provider passthrough

These paths send the provider's own body as is. With a key of your own for that provider, nothing is translated, routed, or charged to Respan credits; the call is only logged, with `X-Respan-Log-Id` and the provider's `X-Respan-Upstream-Request-Id`. Without one, the request runs on Respan credits on the provider the path names, routed and billed like any other call. Use them when you need a provider field the API formats can't translate, or a tool expects the provider's exact responses.

| Path | Provider | Respan key in | Provider key from |
|---|---|---|---|
| `POST /api/{provider}/v1/chat/completions` | An OpenAI-shaped provider, such as `openai`, `azure_openai`, `xai`, `groq`, `mistral`, `deepseek`, `togetherai`, `fireworks`, or `perplexity` | `Authorization: Bearer` | A key sent with the request, else your saved key for that provider, else Respan credits |
| `POST /api/openrouter/v1/chat/completions` | OpenRouter | `Authorization: Bearer` | The `x-openrouter-api-key` header |
| `POST /api/anthropic/passthrough/v1/messages` | Anthropic | `x-api-key` or `Authorization: Bearer` | A key sent with the request, else your saved Anthropic key, else Respan credits |
| `POST /api/google/gemini/v1beta/models/{model}:{action}`, `POST /api/google/models/{model}:{action}` | Google Gemini API | `x-goog-api-key` | A key sent with the request, else your saved Gemini key, else Respan credits |

Save provider keys with [BYOK](/docs/ai-gateway/spend/credits-vs-byok#byok), or send one with the request in `customer_credentials` or `credential_override` (see [Send a key with the request](/docs/ai-gateway/spend/credits-vs-byok#request-keys)). A `credential_override` that names no key is refused rather than sent on Respan's key. OpenRouter passthrough needs `x-openrouter-api-key` and is refused with `400` without it.

Respan params go in `respan_params` in the body, or in `metadata.respan_params`, and are removed before sending.

<Tabs>
<Tab title="Anthropic">
```python
import os
import anthropic

client = anthropic.Anthropic(
    base_url="https://gateway.respan.ai/api/anthropic/passthrough",
    api_key=os.environ["RESPAN_API_KEY"],
)

message = client.messages.create(
    model="claude-sonnet-4-5-20250929",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)
```
</Tab>
<Tab title="OpenRouter">
```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.respan.ai/api/openrouter/v1",
    api_key=os.environ["RESPAN_API_KEY"],
    default_headers={"x-openrouter-api-key": os.environ["OPENROUTER_API_KEY"]},
)

response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4.5",
    messages=[{"role": "user", "content": "Hello!"}],
    extra_body={"respan_params": {"customer_identifier": "user_8842"}},
)
```
</Tab>
<Tab title="Gemini">
```python
import os
from google import genai

client = genai.Client(
    api_key=os.environ["RESPAN_API_KEY"],
    http_options={"base_url": "https://gateway.respan.ai/api/google/gemini"},
)

response = client.models.generate_content(model="gemini-2.5-flash", contents="Hello!")
```
</Tab>
</Tabs>

On an OpenAI-shaped passthrough, send `respan_params` as an object through `extra_body`. The OpenAI SDK types `metadata` as strings, and a `respan_params` string inside `metadata` is ignored.
