πŸš€ Payment is coming soon! Get your $5 free credit now β€” no credit card needed. We'll notify you the moment billing goes live. βœ•
🚀

Quick Start

For beginners: get Key β†’ test β†’ integrate, all in 5 minutes.

📚

API Reference

Complete API docs with request/response formats and error codes.

💰

Pricing & Plans

Backpack $15/mo, Launch $65/mo. Pay-as-you-go also available.

🚀 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:

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

# pip install openai 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)

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

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

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

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

StatusMeaningAction
200SuccessParse response normally
400Request ParametersErrorCheck required fields (model, messages)
401Invalid API keyCheck Authorization header format and key value
402Insufficient balanceAdd credits or upgrade plan
403Plan limitUpgrade for higher quotas
429Rate limitedReduce rate. Free: 10/min, Paid: 100/min
500Server errorRetry 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)

Compare to OpenAI GPT-4o Mini ($0.50/1M input) β€” save up to 93%.

Plan Details

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 β†’