🚀 Quick Start
1
Get Your API Key
Sign up on the Dashboard with your email to get a free API Key. New users receive $5 free credits β no credit card required.
A key is generated automatically (format: mh-sk-xxx... ). Copy and save it β for security, we only show it once.
🎉 Get Your API Key β
2
Test Your Key
Copy this command to your terminal (Mac: Terminal, Windows: CMD/PowerShell), replace YOUR_API_KEY and run:
Copy
curl https://modelhub-api.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "deepseek-v4-flash", "messages": [{"role": "user", "content": "Say hello"}]}'
If the response JSON contains a "choices" field β you're live! 🎉
Or click "Send Test Request" on the Dashboard for one-click testing.
3
Integrate Into Your Project
ModelHub is fully OpenAI-compatible. Just change two things:
Python
Copy
from openai import OpenAI
client = OpenAI(
base_url="https://modelhub-api.com/v1 ",
api_key="mh-sk-your-key "
)
response = client.chat.completions.create(
model="deepseek-v4-flash ",
messages=[{"role" : "user" , "content" : "Hello!" }]
)
print (response.choices[0].message.content)
JavaScript (Node.js)
Copy
import OpenAI from "openai"
const client = new OpenAI({
baseURL: "https://modelhub-api.com/v1" ,
apiKey: "mh-sk-your-key"
})
const response = await client.chat.completions.create ({
model: "deepseek-v4-flash" ,
messages: [{ role: "user" , content: "Hello!" }]
})
console.log (response.choices[0].message.content)
cURL
Copy
curl https://modelhub-api.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer mh-sk-your-key" \
-d '{
"model" : "deepseek-v4-flash" ,
"messages" : [{"role" : "user" , "content" : "Hello!" }]
}'
Pro tip: If you're already using OpenAI, just change base_url change to https://modelhub-api.com/v1 οΌapi_key to your ModelHub key. Everything else stays the same!
4
Manage Your Keys
On the Dashboard you can:
View balance & usage stats
Create & revoke multiple named API keys
One-click copy for commands & snippets
Upgrade plan or add credits
Use separate keys per project for better security.
Go to Dashboard β
📚 API Reference
Base URL
https://modelhub-api.com/v1
Authentication
All API requests require an API Key in the HTTP header:
Authorization: Bearer mh-sk-your-key
Get your API Key from the Dashboard . Keep it safe β anyone with your key can use the API.
Available Models
deepseek-v4-flash β Flagship model. Fast & efficient for general use. β Live
deepseek-reasoner β Advanced reasoning. Coming soon
Chat completions (Chat Completions)
POST
/v1/chat/completions
Chat completions
Fully compatible with OpenAI Chat Completions. Create model responses for chat conversations.
Request Format
{
"model" : "deepseek-v4-flash" ,
"messages" : [
{"role" : "system" , "content" : "You are a helpful assistant." },
{"role" : "user" , "content" : "Hello!" }
],
"temperature" : 0.7,
"max_tokens" : 1024,
"stream" : false
}
Request Parameters
model (required) β Model ID. Currently deepseek-v4-flash
messages (required) β Array of messages, each with role (system/user/assistant) and content
temperature (optional) β 0 to 2, controls randomness. Default 1.0
max_tokens (optional) β Max output tokens. Default 4096
stream (optional) β Enable SSE streaming. Default false
Response Format
{
"id" : "chatcmpl-..." ,
"object" : "chat.completion" ,
"created" : 1234567890,
"model" : "deepseek-v4-flash" ,
"choices" : [
{
"index" : 0,
"message" : {
"role" : "assistant" ,
"content" : "Hello! How can I help?"
},
"finish_reason" : "stop"
}
],
"usage" : {
"prompt_tokens" : 10,
"completion_tokens" : 10,
"total_tokens" : 20,
"cost_usd" : 0.000005
}
}
List Models
GET
/v1/models
List available models
Error Codes
Status Meaning Action
200 Success Parse response normally
400 Request ParametersError Check required fields (model, messages)
401 Invalid API key Check Authorization header format and key value
402 Insufficient balance Add credits or upgrade plan
403 Plan limit Upgrade for higher quotas
429 Rate limited Reduce rate. Free: 10/min, Paid: 100/min
500 Server error Retry later or contact support
💰 Pricing & Plans
ModelHub uses credit-based billing. Subscriptions include monthly tokens with pay-as-you-go overage. Credits never expire.
Free Trial
$5
One-time free credits No credit card needed
β
Backpack
$15
/mo Β· 100M tokens included
β
Launch
$65
/mo Β· 500M tokens included
Pay-as-you-go (per 1M tokens)
deepseek-v4-flash InputοΌ$0.15 / 1M tokens
deepseek-v4-flash OutputοΌ$0.30 / 1M tokens
Cache hitοΌ$0.04 / 1M tokens
Compare to OpenAI GPT-4o Mini ($0.50/1M input) β save up to 93% .
Plan Details
Backpack $15/ζ β 100M tokens + 1 δΈͺ API Key + standard rate limits
Launch $65/ζ β 500M tokens + 5 δΈͺ API Key + priority routing + high rate limits
Need more?Contact our enterprise team for dedicated deployment, 99.9% SLA, unlimited keys, and more.
PayPal, credit card & crypto accepted. Credits never expire. Upgrades take effect immediately.
View Your Plan β