GET /v1/models. Calls are paid with pre.dev credits.
Copy your pre.dev API key from Integrations → Built-in in the dashboard: pre.dev/projects/integrations for your personal workspace, or the Integrations page of a team workspace. Workspace keys start with
pdk_.
Quickstart
First request with curl, the OpenAI SDK, the Vercel AI SDK, or the Anthropic SDK.
In apps you build
Call models from apps built on pre.dev, with the key already in place.
Pricing
Credits per call, the free allowance, and what happens when credits run out.
Models
Browse the catalog with credit prices attached.
How a call is handled
- Authenticate. Your pre.dev key, sent as
Authorization: Bearerorx-api-key, identifies the workspace. A missing or invalid key returns401. - Admit. The call needs enough credits and must stay under the workspace rate limit. Otherwise it returns
402or429, and no model runs. - Route. The model you named answers, or the models in your
modelslist, tried in order. You choose the model; pre.dev chooses how to serve it. - Charge. Credits for the call’s metered usage are charged once the response or stream finishes. See response headers for how the charge is reported.
What you send
Model ids are<author>/<slug> strings exactly as listed by GET /v1/models, for example anthropic/claude-sonnet-5, deepseek/deepseek-v4.1-flash, google/gemini-3.8-flash, or openai/gpt-6-luna. There are no separate pre.dev-specific model names.
The standard chat completion fields (messages, temperature, max_tokens, stop, and so on) work as you would expect. The pre.dev AI API also supports these options, described on fallbacks and advanced options:
What you get back
Responses use the standard OpenAI-compatible shapes, and the Anthropic Messages shape on/v1/messages. Model responses carry a pre.dev generation id (pdg-…) and token counts in usage. Streaming chat completions end with a chunk that carries usage.
Endpoints
Any other
/v1 path returns 404.
Response headers
Every inference call returnsx-predev-request-id (pdr_…). Completed non-streaming calls also return x-predev-credits-charged and x-predev-credits-remaining (omitted when the workspace has no credit limit). Streamed calls carry only the request id; read their charge from GET /v1/usage or GET /v1/generation. Send x-predev-project-id to attribute usage to one of your projects.
Billing
Each call is charged in credits from the model’s metered usage for that call. The credit price per model is listed onGET /v1/models under predev.credits_per_m_input and predev.credits_per_m_output. Catalog reads are free. Details and the free allowance are on pricing.
