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

# OpenAI Text Embeddings API

> OpenAI text-embedding-3-large via RouterBase — OpenAI-compatible embeddings for search, clustering, and RAG.

## Overview

OpenAI's **text-embedding-3-large** on RouterBase, served through the
standard OpenAI-compatible embeddings endpoint. Returns dense vectors for
semantic search, clustering, classification, and retrieval-augmented
generation.

|                |                                           |
| -------------- | ----------------------------------------- |
| **Provider**   | OpenAI                                    |
| **Family**     | `text-embedding-3-large`                  |
| **Modality**   | Embedding                                 |
| **Max input**  | 8191 tokens                               |
| **Dimensions** | up to 3072 (truncatable via `dimensions`) |

## Models

* `openai/text-embedding-3-large`

Pricing is deliberately not reproduced here. Rates are set per model in the
RouterBase catalogue and can be overridden per account, so any figure copied
into this page is a snapshot that goes stale the next time a rate changes.
Fetch the current rate for any model from the [Models API](/api-reference/models):

```http theme={null}
GET /api/models/{model}/pricing
```

URL-encode the slash in the model id — e.g. `openai%2Ftext-embedding-3-large`.

## Endpoint

```http theme={null}
POST https://routerbase.com/v1/embeddings
```

Drop-in compatible with the OpenAI client — point it at
`https://routerbase.com/v1`.

## Quickstart

```bash theme={null}
curl https://routerbase.com/v1/embeddings \
  -H "Authorization: Bearer $ROUTERBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/text-embedding-3-large",
    "input": "The quick brown fox jumps over the lazy dog"
  }'
```

`input` accepts a single string or an array of strings to embed in one
call. Optional parameters:

* `dimensions` — truncate the output vector to a smaller size (e.g. `256`).
* `encoding_format` — `"float"` (default) or `"base64"`.

### Response

```json theme={null}
{
  "object": "list",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.0023, -0.0091, "..."] }
  ],
  "model": "openai/text-embedding-3-large",
  "usage": { "prompt_tokens": 11, "total_tokens": 11 }
}
```

Live catalogue + current rates: the [Models API](/api-reference/models).
