API Console

Build with deMac

Connect with the OpenAI SDK, choose a model, and send your first request.

Manage API keys

Base URL

https://api.demac.example/v1

Quick start

Install your preferred SDK and point it to deMac. Create an API key below, then add it to the example.

Browse models
# No installation needed
export DEMAC_API_KEY="<YOUR_API_KEY>"
export DEMAC_BASE_URL="https://api.demac.example/v1"

Replace the model placeholder with an ID returned by /v1/models. Availability depends on connected providers.

API Keys

All keys draw from your shared account balance. A key's spend cap is a sub-limit on that balance, not extra funds.

This console uses one active key (saved in this browser) for its own chat and test calls. It's provisioned automatically; you can also point it at a new key below.

Connect your wallet to create and manage API keys.

Endpoint reference

Request formats, responses, and authentication requirements.

8 endpoints

Request examples

Chat completions

Stream a response, continue a conversation, or set a system message.

curl -X POST https://api.demac.example/v1/chat/completions \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model-id-from-/v1/models>",
    "messages": [{"role": "user", "content": "Explain quantum computing"}],
    "stream": true,
    "max_tokens": 1024
  }'

List models

Find model IDs and current provider coverage before sending a request.

from openai import OpenAI

client = OpenAI(base_url="https://api.demac.example/v1", api_key="<YOUR_API_KEY>")

models = client.models.list()
for model in models.data:
    print(f"{model.id}")

Need to change your example URL?

Open settings