DeepSeek API — Pay with Credit Card

Access DeepSeek V4-Flash & V4-Pro via credit card. Instant API key after purchase. English dashboard. OpenAI-compatible — just change your base URL.

New to API Hub? Create an account, purchase credits with your card, and get your API key instantly from the Dashboard. No Chinese payment methods needed.

Getting Started

  1. Create an account (email + password)
  2. Purchase credits from the Dashboard
  3. Your API key will appear in the Dashboard automatically
  4. Use the key with any OpenAI-compatible SDK

Quick Start

Replace your existing OpenAI API base URL with ours. Your existing code works without any changes — just update the base_url and API key.

Python

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

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"}]
  }'

Node.js

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);

Models

ModelIDInput (cache hit)InputOutputContext
DeepSeek V4-Flashdeepseek-v4-flash$0.02/M$0.20/M$0.40/M1M
DeepSeek V4-Prodeepseek-v4-pro$0.15/M$0.60/M$1.20/M1M
Need a different model? We're constantly adding more. Contact us to request a model.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer ah-your-key-here

Get your API key from the Dashboard after purchase.

Available Endpoints

EndpointMethodDescription
/v1/chat/completionsPOSTCreate a chat completion
/v1/modelsGETList available models

Streaming

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="")

Error Codes

CodeMeaning
401Invalid or missing API key
429Rate limit exceeded. Slow down.
500Server error. Try again.
502Upstream error. Try again.

Rate Limits

Default rate limit is 1000 requests per minute for Flash, 500 for Pro. Contact us if you need higher limits.

Cache Hint

DeepSeek automatically caches repeated prompt prefixes. To maximize cache hits and save costs:

💡 Tip: You can see your cache hit rate in the API response fields prompt_cache_hit_tokens and prompt_cache_miss_tokens.

FAQ

How to use DeepSeek API with a credit card?

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.

How is API Hub different from using DeepSeek directly?

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.

Can I pay for DeepSeek API with a credit card?

Yes — Visa, Mastercard, Apple Pay, and Google Pay are all accepted. No Chinese payment methods (Alipay, WeChat Pay) required.

Is DeepSeek V4 compatible with the OpenAI SDK?

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.

What is the context window size?

Both DeepSeek V4-Flash and V4-Pro support a 1 million token context window.

Does DeepSeek V4 support streaming?

Yes. Set stream: true in your request for Server-Sent Events (SSE) streaming, just like OpenAI.

Do credits expire?

No. Purchased credits never expire. Use them at your own pace.

Where is the service hosted?

API Hub is hosted on DigitalOcean. API requests are routed to DeepSeek's servers in China.

Still have questions? Email us at 2648769621@qq.com.