Embeddings
code
POST /api/v1/embeddingsGenerate vector embeddings for text. Compatible with the OpenAI Embeddings API.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Embedding model ID |
input | string | string[] | Yes |
Example
bash
curl https://modelgates.ai/api/v1/embeddings \ -H "Authorization: Bearer sk-mg-YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/text-embedding-3-small", "input": "The quick brown fox" }'Pricing
Embedding costs are calculated only on input tokens (output price = 0). Prices include the standard 1.20× markup.