# CheapTokens Skill — Reference

## Base URLs

| Env        | Production                           |
| ---------- | ------------------------------------ |
| Gateway    | `https://api.cheaptokens.com/v1`     |
| Site       | `https://cheaptokens.com`            |
| Create key | https://cheaptokens.com/console/keys |
| Docs       | https://cheaptokens.com/docs         |
| Market     | https://cheaptokens.com/market       |
| This skill | https://cheaptokens.com/skills       |

## Auth checklist

- Key prefix: `cheap-`
- `Authorization: Bearer <key>`
- Compatible with OpenAI SDKs by swapping `base_url` / `baseURL`

## Type → endpoint

From `GET /v1/models` fields: `type`, `primary_endpoint`, `endpoints[]`, `billing_unit` (`token` \| `image` \| `second` \| `request`).

| type                                                                | primary_endpoint           | docs           |
| ------------------------------------------------------------------- | -------------------------- | -------------- |
| LLM, MULTIMODAL, OCR, TRANSLATION, CLASSIFICATION, OBJECT_DETECTION | `/v1/chat/completions`     | `#chat`        |
| CODE_COMPLETION                                                     | `/v1/completions`          | `#completions` |
| EMBEDDING                                                           | `/v1/embeddings`           | `#embeddings`  |
| RERANKER                                                            | `/v1/rerank`               | `#rerank`      |
| TEXT_TO_IMAGE                                                       | `/v1/images/generations`   | `#images`      |
| IMAGE_TO_IMAGE                                                      | `/v1/images/edits`         | `#images`      |
| TEXT_TO_VIDEO                                                       | `/v1/videos/generations`   | `#videos`      |
| SPEECH_TO_TEXT                                                      | `/v1/audio/transcriptions` | `#audio`       |
| TEXT_TO_SPEECH                                                      | `/v1/audio/speech`         | `#audio`       |

## Headers

| Header             | Values                          |
| ------------------ | ------------------------------- |
| `X-Route-Strategy` | `cheapest`, `fastest`, `stable` |

## Install

```bash
mkdir -p ~/.cursor/skills/cheaptokens
curl -fsSL https://cheaptokens.com/skills/cheaptokens/SKILL.md \
  -o ~/.cursor/skills/cheaptokens/SKILL.md
curl -fsSL https://cheaptokens.com/skills/cheaptokens/reference.md \
  -o ~/.cursor/skills/cheaptokens/reference.md
```
