Skip to main content
POST https://api.pre.dev/v1/chat/completions takes the OpenAI-compatible chat completion request body and returns the chat completion response. POST /v1/completions (text completions) and POST /v1/responses (Responses API shape) work the same way with their own bodies.

Request

Every other standard field (temperature, max_tokens, stop, and so on) is forwarded to the model unchanged. Advanced options such as models, provider, reasoning, and plugins are on routing and fallbacks.

Response

The body is the standard chat completion response. usage.cost is the model’s metered cost for the call in dollars, which the charge was computed from; model is the model that served the call.
Send x-predev-project-id: <projectId> to attribute the call to a project. See usage.

Errors

Gateway errors (401, 402, 429, 503) use the OpenAI error shape with a predev object; provider errors, such as an unknown model id, are returned with their original status and message. See errors.