Quickstart

1. Register

Open the local dashboard and create an account:

/dashboard

Registration creates your first virtual API key and gives you MVP test credits.

2. Use the OpenAI SDK

pip install openai

from openai import OpenAI

client = OpenAI(
    api_key="sk-cmag-your-virtual-api-key",
    base_url="http://127.0.0.1:8000/v1"
)

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Say hello"}]
)
print(response.choices[0].message.content)

3. REST API

curl http://127.0.0.1:8000/v1/chat/completions \
  -H "Authorization: Bearer sk-cmag-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-chat",
    "messages": [{"role":"user","content":"Hello"}]
  }'

Endpoints