Documentation

API quickstart

modelhaus serves an OpenAI-compatible API. If you have code that talks to the OpenAI SDK, you can point it at modelhaus by changing two things: the base URL and the API key.

Base URL: https://modelhaus.ai/v1

Authentication

Authenticate with a bearer token in the Authorization header:

Authorization: Bearer mh-...

Keys come from your dashboard. Create an account, verify your email, then create a key under Account → API keys. The full key is shown once at creation — copy it then. Treat keys like passwords; never commit them to source control.

curl example

A basic chat completion:

# Chat completion
curl https://modelhaus.ai/v1/chat/completions \
  -H "Authorization: Bearer mh-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [
      {"role": "system", "content": "You are concise."},
      {"role": "user", "content": "Explain mixture-of-experts in one sentence."}
    ]
  }'

Python (OpenAI SDK)

Install the official client with pip install openai, then:

from openai import OpenAI

client = OpenAI(
    base_url="https://modelhaus.ai/v1",
    api_key="mh-...",   # from your dashboard
)

resp = client.chat.completions.create(
    model="llama-3.3-70b",
    messages=[
        {"role": "user", "content": "Write a haiku about open models."},
    ],
)
print(resp.choices[0].message.content)

Streaming works too — pass stream=True and iterate over the response, exactly as with the OpenAI SDK.

List available models

Fetch the live catalog programmatically:

curl https://modelhaus.ai/v1/models \
  -H "Authorization: Bearer mh-..."

Model IDs

Use these ids in the model field. See the models page for live pricing and context windows.

  • deepseek-v4-pro — DeepSeek-V4-Pro, frontier reasoning MoE
  • llama-3.3-70b — Llama 3.3 70B, flagship chat
  • qwen-2.5-32b — Qwen2.5 32B, workhorse chat
  • qwen-2.5-coder — Qwen2.5-Coder 32B, code generation and review
  • deepseek-r1 — DeepSeek-R1, step-by-step reasoning
  • nomic-embed — Nomic Embed, 768-dim text embeddings

Embeddings

Generate vectors for search and RAG with the embeddings endpoint:

curl https://modelhaus.ai/v1/embeddings \
  -H "Authorization: Bearer mh-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nomic-embed",
    "input": "modelhaus hosts frontier open models"
  }'

Errors

  • 401 — missing or invalid API key. Check the Authorization header.
  • 402 — insufficient credit. Top up under Account.
  • 404 — unknown model id. See Model IDs.
  • 429 — rate limited. Back off and retry.

Ready to call?

Create a key and make your first request in under a minute.

Get your API key