deepseek/deepseek-v4.1-flash and read the credits it charged.
Before you start
Copy your key from the dashboard under Integrations → API Keys and store it asPREDEV_API_KEY. Keys look like pdk_…. A free workspace can make 5 credits of gateway calls; after that, calls need a subscription or credits. See API key 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-5.6-luna. An invalid id returns the provider’s error with its original status and message.
Continue with streaming, tools and structured output, or routing and fallbacks.
