Text · OpenAI

Embedding API

OpenAI text embeddings for semantic search, retrieval, clustering, and ranking workflows.

Operational · 3 variants · from $0.010
runapi.ai
# Base URL
https://runapi.ai

# Endpoints
POST /v1/embeddings
curl https://runapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "text-embedding-ada-002",
  "input": [
    "Embed these support articles and a customer query so I can rank the closest matches."
  ],
  "encoding_format": "float"
}'
from openai import OpenAI

client = OpenAI(
    base_url="https://runapi.ai/v1",
    api_key="your-runapi-key"
)

response = client.chat.completions.create(
    model="text-embedding-ada-002",
    messages=[{"role": "user", "content": "Embed these support articles and a customer query so I can rank the closest matches."}]
)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://runapi.ai/v1",
  apiKey: "your-runapi-key"
});

const response = await client.chat.completions.create({
  model: "text-embedding-ada-002",
  messages: [{ role: "user", content: "Embed these support articles and a customer query so I can rank the closest matches." }]
});
https://runapi.ai 1 endpoint
OVERVIEW

OpenAI Embedding models convert text into dense vectors for semantic search, retrieval-augmented generation, clustering, classification, and ranking. The text-embedding-3 family supports efficient production retrieval with optional vector dimensionality control.

  • Multiple variants for different speed, quality, and cost tiers
  • Model skill includes docs, schemas, pricing, and setup notes
  • Works with Claude Code, Codex, Gemini CLI, Cursor, and VS Code
  • Single API key and unified billing across all variants
  • Async task management with polling and webhook callbacks
  • Failed generations are not charged
VARIANTS

Compare all API variants

Variant Billing From
text-embedding-3-large 1K tokens $0.010 View →
text-embedding-3-small 1K tokens $0.010 View →
text-embedding-ada-002 1K tokens $0.010 View →
API

Embedding API endpoints

Use the OpenAI or Anthropic SDK with your RunAPI key. No extra SDK required.

Endpoint Protocol
/v1/embeddings OpenAI Embeddings
HOW IT WORKS

From model skill to first result in four steps

01

Choose a model

Browse the model catalog and pick the model and variant that match your output type, quality bar, and latency target. Each variant page shows its model ID, pricing, and parameter constraints so you can compare before committing.

02

Configure

Set your RunAPI API key as an environment variable and install the model skill in your coding workspace. The skill loads docs, typed schemas, pricing notes, and setup steps so your agent has the right context from the start.

03

Call

Use the skill instructions to add the model feature inside your application. Send a POST request with your prompt, model ID, and parameters. RunAPI routes the request, manages the async lifecycle, and returns structured JSON.

04

Receive

Poll by task ID for completion, stream results end-to-end when supported, or configure a webhook callback URL to receive results automatically. The CLI provides a built-in wait command, and the SDKs offer both polling and callback patterns.

CONTEXT

What is the Embedding API?

OpenAI Embedding models expose the standard OpenAI Embeddings API through RunAPI, so vector search and RAG pipelines can use the same RunAPI key as GPT chat and Responses traffic.

Provider
OpenAI
Modality
Text
WHY RUNAPI

Why route the Embedding API through RunAPI

One auth, every provider

A single RunAPI API key unlocks the whole model catalog across all providers. No separate accounts to create, no API keys to rotate per integration, and no credential management overhead. Add a new model to your app by changing one parameter.

Unified pricing & billing

Per-call pricing in USD, billed monthly into a single invoice. No subscription tiers, no minimum spend, and failed generations are never charged. The pricing page and check_pricing API show exact costs before you commit to a model.

Schema-first SDK

Typed schemas, parameter constraints, and setup notes are packaged in the model skill so your implementation starts from the right contract. The skill loads into Claude Code, Codex, Gemini CLI, Cursor, and VS Code — your agent knows the correct request shape before you write a line of code.

FAQ

Common questions

Which embedding model should I use?

Use text-embedding-3-small for efficient production retrieval and text-embedding-3-large when recall quality matters more than vector size.

Can I shorten the embedding vector?

Yes — pass the dimensions parameter with text-embedding-3-large or text-embedding-3-small when you need smaller vectors.

Does the endpoint return the standard OpenAI response shape?

Yes — /v1/embeddings returns an OpenAI-compatible list response with embedding data, model, and usage.

Can embedding models be used with Chat Completions or Responses?

No — embedding models are only available on /v1/embeddings.

What inputs are supported?

Use a string, an array of strings, or token arrays following the OpenAI Embeddings API format.

Which variant should I start with?

Pick the cheapest variant that meets your quality bar. Most teams start on the fast variant and graduate to pro for production.

Is there a free tier?

New accounts get free first calls on every model. After that, pay per call.

Do you stream results?

Where streaming is available, RunAPI streams end-to-end.

How are failures billed?

Failed generations are not charged.

Are outputs cached?

Generated outputs are stored and retrievable by task ID. Inputs are not cached.

Can I use commercially?

Yes — commercial use is included for every variant unless a model license explicitly restricts it, which is called out on the variant page.

What about rate limits?

Per-key rate limits scale with usage tier. See pricing page for current limits.

Where can I report issues?

Open an issue on the public GitHub repo or email support.

START NOW

Start building with the Embedding API.