Skip to main content
POST
cURL
POST https://api.pre.dev/v1/embeddings takes the OpenAI-compatible embeddings request and returns the embeddings response. GET /v1/embeddings/models lists embedding models with credit prices; it is free and not rate-limited.
The response is the standard embeddings response: data[].embedding, model, and usage. The call is charged from its metered usage, reported in x-predev-credits-charged.

Rerank

POST /v1/rerank ranks documents against a query. Send a model, a query, and documents; the response returns the documents ordered by relevance with a score for each.
Rerank models are not returned by GET /v1/models or GET /v1/models/public. These ids work today: cohere/rerank-v3.5, cohere/rerank-4-fast, cohere/rerank-4-pro, voyageai/rerank-2.5, voyageai/rerank-2.5-lite, and qwen/qwen3-reranker-8b. Rerank calls are billed like any other inference call. See the rerank reference.

Authorizations

Authorization
string
header
required

The workspace API key (pdk_…) from Integrations → Built-in in the pre.dev dashboard.

Headers

x-predev-project-id
string

Attribute this call to one of the workspace's projects. An id the workspace does not own is ignored.

Body

application/json
model
string
required

An id from GET /v1/embeddings/models.

Example:

"openai/text-embedding-3-small"

input
required

Text to embed, or an array of texts. Multimodal models also take content objects.

dimensions
integer

Output size, on models that support it.

encoding_format
enum<string>
Available options:
float,
base64
input_type
string

For models that distinguish queries from documents, for example search_query or search_document.

Response

One embedding per input, in input order.

object
string
required
Allowed value: "list"
data
object[]
required
model
string
required
usage
object