deepseek/deepseek-v4.1-flash and read the credits it charged.
Before you start
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 withpdk_.
Store it as PREDEV_API_KEY. A Free workspace can spend 5 credits on gateway calls in total, whatever its balance; after that, calls return 402 until the workspace subscribes. See authentication and pricing.
Send a request
- curl
- Node.js
- Python
- Vercel AI SDK
- Anthropic SDK
Read the response
The body is a standard chat completion response. Three headers come from the gateway:
Add
-i to the curl command to print them. In the SDKs, use the raw-response helpers (client.chat.completions.with_raw_response in Python, .withResponse() in Node) when you need headers.
Swap the model
Changemodel to any id from GET /v1/models, for example anthropic/claude-sonnet-5, google/gemini-3.8-flash, or openai/gpt-6-luna. An id the catalog does not serve returns a 4xx error; check the id against the catalog.
Continue with streaming, tools and structured output, or fallbacks and advanced options.
