Text OpenAI

Embedding API

Use the Embedding API via RunAPI with a model skill, unified auth, and pay-as-you-go pricing.

runapi.ai
# Base URL
https://runapi.ai

# Endpoints
POST /v1/embeddings
curl https://runapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNAPI_API_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

About Embedding

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.

Provider
OpenAI
Modality
Text

Embedding API endpoints

EndpointProtocol
POST /v1/embeddingsOpenAI Embeddings

Available Versions

Variant Billing Pricing
text-embedding-3-large 1K tokens Input $0.10 / 1M tokens | Output Free / 1M tokens View →
text-embedding-3-small 1K tokens Input $0.02 / 1M tokens | Output Free / 1M tokens View →
text-embedding-ada-002 1K tokens Input $0.08 / 1M tokens | Output Free / 1M tokens View →
PRICING

Embedding Pricing

Endpoint Resolution Duration Price
embedding — — Input $0.10 / 1M tokens | Output Free / 1M tokens

Prices shown for text-embedding-3-large. Other variants retain their own endpoint pricing.

Agent integration

Run Embedding From an Agent

HOW IT WORKS

Get Started with Embedding

  1. Create an API key

    Sign up and generate an API key from the dashboard.

  2. Pick a version

    Choose the version that best matches your quality and cost requirements.

  3. Send a request

    Submit your prompt and parameters to the model's documented endpoint.

  4. Get your result

    Poll the task or set a webhook, then download the completed output.

CONTEXT

About Embedding on RunAPI

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
See all →
Modality
Text
Browse models →

Why Use Embedding 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.

Embedding 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.

SIMILAR MODELS

Similar Text Models

Start generating with Embedding