How to Call DeepSeek Models on AI in IDE
AI in IDE is an independent third-party API gateway for DeepSeek; it is not operated by or affiliated with DeepSeek. In each chat completion request, explicitly set model to deepseek-v4.1-flash or deepseek-v4-pro. After you subscribe or top up, create an API key at API keys and select DeepSeek as its channel. Send the key as a Bearer token. The channel changes how quickly your purchased quota is consumed (0.6×); it does not change the amount of quota you bought.
Endpoint and key
Point an OpenAI-compatible client at this base URL:
1 https://api.aiinide.com/api/deepseek/v1
Text generation uses POST https://api.aiinide.com/api/deepseek/v1/chat/completions. Every request must carry Authorization: Bearer <key>. Call GET https://api.aiinide.com/api/deepseek/v1/models with the same key to list the models available to it. Keys from other channels are rejected.
Supported models
The DeepSeek channel accepts exactly two text model IDs:
deepseek-v4.1-flashdeepseek-v4-pro
DeepSeek's official documentation recommends the name deepseek-flash for the DeepSeek-V4.1-Flash-1017 model. That is DeepSeek's own alias; this gateway uses the catalog ID deepseek-v4.1-flash. Do not send deepseek-flash to AI in IDE. For the Pro model, both the official documentation and this catalog use deepseek-v4-pro.
Create a chat completion
The example below is a billable request. It reads the key from an environment variable; replace the placeholder with your DeepSeek dashboard key before running it.
1 export DEEPSEEK_API_KEY="YOUR_DASHBOARD_API_KEY"2 3 curl --globoff --fail-with-body 'https://api.aiinide.com/api/deepseek/v1/chat/completions' \4 -H "Authorization: Bearer $DEEPSEEK_API_KEY" \5 -H "Content-Type: application/json" \6 -d '{7 "model": "deepseek-v4.1-flash",8 "messages": [{"role": "user", "content": "Explain in one sentence what this JavaScript function returns: function add(a, b) { return a + b; }"}],9 "max_tokens": 25610 }'
The same endpoint works with the OpenAI SDK. The SDK appends /chat/completions to the base URL, so keep the /v1 suffix exactly as shown:
1 import os2 from openai import OpenAI3 4 client = OpenAI(5 api_key=os.environ["DEEPSEEK_API_KEY"],6 base_url="https://api.aiinide.com/api/deepseek/v1",7 )8 9 response = client.chat.completions.create(10 model="deepseek-v4.1-flash",11 messages=[{"role": "user", "content": "Explain what this function returns."}],12 )13 print(response.choices[0].message.content)
Read the answer from choices[0].message.content and check choices[0].finish_reason. "length" means the output limit was reached. The proxy records actual usage after the response; check your usage history.
Streaming
Reuse the exported key and set "stream": true in the same Chat Completions request. With curl -N, read the SSE data: events and take answer chunks from choices[].delta.content in order. The stream ends with a final data: [DONE] event. Usage is settled from the actual response; a disconnected stream needs inspection rather than a retry loop.
Pricing
AI in IDE stores DeepSeek's vendor off-peak rates as its pricing basis and uses them all day. The 0.6× channel multiplier is applied once at settlement: it changes how quickly purchased quota is consumed, not the amount of quota you bought. Rates below are user prices in USD per 1M tokens and already include that multiplier.
| Model | Input | Cache hit | Output |
|---|---|---|---|
| deepseek-v4.1-flash | $0.09 | $0.0018 | $0.36 |
| deepseek-v4-pro | $0.396 | $0.0132 | $1.188 |
Promotions and first-purchase offers follow the live configuration on this site. Compare these figures with DeepSeek's official pricing (checked 2026-11-22).
Compare plans and top-ups, browse model pricing, or create a DeepSeek API key.
DeepSeek Harness
The DeepSeek Harness guide explains how to use Claude inside DeepSeek Harness. That is a separate setup; it does not route requests through the DeepSeek channel described on this page.
FAQ
Is AI in IDE the official DeepSeek API?
No. AI in IDE is an independent third-party gateway. It sells subscriptions and top-ups, creates its own channel keys, and forwards supported DeepSeek text requests under the terms on this page.
Which model ID should I send?
Use deepseek-v4.1-flash or deepseek-v4-pro. The official deepseek-flash alias is not accepted here; use the catalog ID instead.
How do I authenticate?
Create a key at API keys with the DeepSeek channel selected, then send it as Authorization: Bearer <key> on every request. A key from another channel returns an error.
Is streaming supported?
Yes, for the Chat Completions endpoint described above. Set "stream": true and read the SSE chunks through the final data: [DONE] event. Usage is settled from the actual response.