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

# API Endpoints

> API endpoint addresses and reference

> Last updated: 2026-06-16

## API Base URL

```
https://api.crazyrouter.com
```

`https://api.crazyrouter.com` is now the default international API access entry. Account login, billing, and the dashboard still use:

```text theme={null}
https://crazyrouter.com
```

For East Asia, prefer this API access address:

```text theme={null}
https://cn.crazyrouter.com
```

Before configuring an SDK, IDE, agent, or third-party client, use this page as the canonical reference for whether that tool should point to the root domain or the `/v1` path.

## Recommended Access Address

Use the international API entry `https://api.crazyrouter.com` by default for API access. Users in East Asia should prefer `https://cn.crazyrouter.com`. These addresses are for API requests only; account login, billing, dashboard, and pricing pages remain on `https://crazyrouter.com`.

## Which Base URL To Use

| Use case                               | Default international entry                                                  | Preferred East Asia entry                                                   | Notes                                                                  |
| -------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| OpenAI-compatible SDKs / clients       | `https://api.crazyrouter.com/v1`                                             | `https://cn.crazyrouter.com/v1`                                             | The client appends paths such as `/chat/completions` and `/models`     |
| Claude Code / Anthropic-native clients | `https://api.crazyrouter.com`                                                | `https://cn.crazyrouter.com`                                                | The client appends `/v1/messages` itself, so do not add `/v1` manually |
| curl / raw HTTP requests               | Full endpoint, for example `https://api.crazyrouter.com/v1/chat/completions` | Full endpoint, for example `https://cn.crazyrouter.com/v1/chat/completions` | Raw requests must include the full API path                            |

<Warning>
  If logs show `/v1/v1/models`, `/v1/v1/messages`, or `/v1/messages/v1/messages`, the client is duplicating API paths. For Claude Code / Anthropic-native clients, reset the base URL to the root domain. For OpenAI-compatible clients, keep only the `/v1` base URL.
</Warning>

## Main Endpoints

### Chat API

| Endpoint               | Method | Description             |
| ---------------------- | ------ | ----------------------- |
| `/v1/chat/completions` | POST   | OpenAI Chat format      |
| `/v1/messages`         | POST   | Anthropic Claude format |
| `/v1/responses`        | POST   | OpenAI Responses API    |
| `/v1/completions`      | POST   | Legacy Completions      |

### Gemini Native Format

| Endpoint                                       | Method | Description          |
| ---------------------------------------------- | ------ | -------------------- |
| `/v1beta/models/{model}:generateContent`       | POST   | Content generation   |
| `/v1beta/models/{model}:streamGenerateContent` | POST   | Streaming generation |

### Image API

| Endpoint                                 | Method | Description                 |
| ---------------------------------------- | ------ | --------------------------- |
| `/v1/images/generations`                 | POST   | OpenAI image generation     |
| `/v1/images/edits`                       | POST   | Image editing               |
| `/mj/submit/imagine`                     | POST   | Midjourney image generation |
| `/ideogram/v1/ideogram-v3/generate`      | POST   | Ideogram V3                 |
| `/kling/v1/images/generations`           | POST   | Kling image generation      |
| `/kling/v1/images/kolors-virtual-try-on` | POST   | Kling virtual try-on        |

### Video API

| Endpoint                             | Method | Description                       |
| ------------------------------------ | ------ | --------------------------------- |
| `/v1/video/create`                   | POST   | Unified video creation            |
| `/v1/video/query`                    | GET    | Unified video query               |
| `/kling/v1/videos/text2video`        | POST   | Kling text-to-video               |
| `/kling/v1/videos/image2video`       | POST   | Kling image-to-video              |
| `/kling/v1/videos/multi-image2video` | POST   | Kling multi-image reference video |
| `/kling/v1/videos/omni-video`        | POST   | Kling omni-video                  |
| `/jimeng/submit/videos`              | POST   | Jimeng video submit               |
| `/jimeng/fetch/{task_id}`            | GET    | Jimeng task query                 |
| `/luma/generations`                  | POST   | Luma video generation             |
| `/runwayml/v1/image_to_video`        | POST   | Runway image-to-video             |
| `/runwayml/v1/tasks/{task_id}`       | GET    | Runway task query                 |

### Audio API

| Endpoint                   | Method | Description           |
| -------------------------- | ------ | --------------------- |
| `/v1/audio/speech`         | POST   | Text-to-Speech (TTS)  |
| `/v1/audio/transcriptions` | POST   | Speech-to-Text (STT)  |
| `/suno/submit/music`       | POST   | Suno music generation |

### Other APIs

| Endpoint                    | Method | Description                              |
| --------------------------- | ------ | ---------------------------------------- |
| `/v1/embeddings`            | POST   | Embeddings                               |
| `/v1/rerank`                | POST   | Reranking                                |
| `/v1/models`                | GET    | Model list                               |
| `/v1/files/uploads`         | POST   | Temporary local image upload             |
| `/v1/files/uploads/base64`  | POST   | Temporary Base64 image upload            |
| `/v1/files/uploads/url`     | POST   | Rehost a remote image as a temporary URL |
| `/v1/files/uploads/presign` | POST   | Presigned direct R2 upload               |

<Note>
  All endpoints support HTTPS. The default international API entry is `https://api.crazyrouter.com`; users in East Asia should prefer `https://cn.crazyrouter.com`; account login, billing, and the dashboard still use `https://crazyrouter.com`.
</Note>
