---
title: Embeddings
description: Turn text into vectors with POST /embeddings - one input or a batch, with the limits the API enforces.
type: how-to
product: ai
summary: The embeddings request, its limits and its answer.
updated: 2026-10-01
order: 7
---

`POST https://api.sylphx.ai/v1/embeddings` returns one vector per input. The wire is
OpenAI-compatible, so the OpenAI SDKs work with only the base URL and the key
changed.

<Callout tone="note" title="Check which embedding models your key can call">
Embeddings are served on their own meter and only for models the catalogue
lists for them. The public catalogue lists no embedding model, so read
the catalogue your key sees before you build on this route: `GET
https://api.sylphx.ai/v1/models`. A model id the catalogue does not serve answers `404
model_not_found`.
</Callout>

## Request

```bash
curl https://api.sylphx.ai/v1/embeddings \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<an embedding model id from your catalogue>",
    "input": ["The first text", "The second text"]
  }'
```

<PropertyTable
	properties={[
		{
			name: 'model',
			type: 'string',
			description: 'The model id from the catalogue. Required.',
		},
		{
			name: 'input',
			type: 'string or string[]',
			description: 'One text, or a batch of up to 2048 texts. Each text must be non-empty and at most 64 KiB.',
		},
		{
			name: 'dimensions',
			type: 'integer',
			description: 'The output size. Accepted only for models that support choosing it.',
		},
		{
			name: 'encoding_format',
			type: 'string',
			description: 'Only float is served.',
		},
	]}
/>

The request is strict: a key the API does not know is refused with a typed
`invalid_request` that names its path, not silently dropped.

## Response

An object of type `list`: a `data` array with one `embedding` object per input
(`index`, `embedding`), the `model` that served, and `usage` with the tokens
metered.

## Errors

The error envelope, the retry rules and the `Idempotency-Key` header are the
same as on every other call: see [errors and retries](/docs/ai/errors). A `402`
means a spending cap held the request before any model was called.

<RelatedDocs
	links={[
		{
			href: '/docs/ai/catalog',
			label: 'Models, limits and data policy',
			description: 'List the catalogue and read a model before you use it.',
		},
		{
			href: '/docs/ai/contract',
			label: 'API contract',
			description: 'Every endpoint and the key format.',
		},
	]}
/>
