Access DeepSeek V4-Flash & V4-Pro via credit card. Instant API key after purchase. English dashboard. OpenAI-compatible — just change your base URL.
Replace your existing OpenAI API base URL with ours. Your existing code works without any changes — just update the base_url and API key.
from openai import OpenAI
client = OpenAI(
base_url="https://api-hub.cc/v1",
api_key="ah-your-key-here"
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)
curl https://api-hub.cc/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ah-your-key-here" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello"}]
}'
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api-hub.cc/v1",
apiKey: "ah-your-key-here",
});
const response = await client.chat.completions.create({
model: "deepseek-v4-flash",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);
| Model | ID | Input (cache hit) | Input | Output | Context |
|---|---|---|---|---|---|
| DeepSeek V4-Flash | deepseek-v4-flash | $0.02/M | $0.20/M | $0.40/M | 1M |
| DeepSeek V4-Pro | deepseek-v4-pro | $0.15/M | $0.60/M | $1.20/M | 1M |
Include your API key in the Authorization header:
Authorization: Bearer ah-your-key-here
Get your API key from the Dashboard after purchase.
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions | POST | Create a chat completion |
/v1/models | GET | List available models |
We support Server-Sent Events (SSE) streaming. Use stream: true in your request:
stream = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Write a poem"}],
stream=True
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
| Code | Meaning |
|---|---|
| 401 | Invalid or missing API key |
| 429 | Rate limit exceeded. Slow down. |
| 500 | Server error. Try again. |
| 502 | Upstream error. Try again. |
Default rate limit is 1000 requests per minute for Flash, 500 for Pro. Contact us if you need higher limits.
DeepSeek automatically caches repeated prompt prefixes. To maximize cache hits and save costs:
prompt_cache_hit_tokens and prompt_cache_miss_tokens.
Sign up at api-hub.cc with your email, purchase credits with Visa, Mastercard, Apple Pay, or Google Pay, and get your API key instantly. No Chinese payment methods required.
API Hub offers credit card payments, an English-language dashboard, and instant API key provisioning. DeepSeek's official platform is in Chinese and may require Chinese payment methods.
Yes — Visa, Mastercard, Apple Pay, and Google Pay are all accepted. No Chinese payment methods (Alipay, WeChat Pay) required.
Yes. DeepSeek V4 is fully compatible with the OpenAI Python, Node.js, and any other OpenAI SDK. Just set base_url to https://api-hub.cc/v1 and use your API Hub API key.
Both DeepSeek V4-Flash and V4-Pro support a 1 million token context window.
Yes. Set stream: true in your request for Server-Sent Events (SSE) streaming, just like OpenAI.
No. Purchased credits never expire. Use them at your own pace.
API Hub is hosted on DigitalOcean. API requests are routed to DeepSeek's servers in China.