Documentation.

The demo API, as it actually works today — localhost only, demo keys, demo limits.

Base URL

http://localhost:8787

The demo backend runs on port 8787. The static frontend on port 8000 calls it from the browser; if the backend is not running, API calls fail and the pages say so.

Chat completions

POST /v1/chat/completions — OpenAI-compatible.

curl http://localhost:8787/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer nf_demo_YOUR_KEY" \
  -d '{
    "model": "qwen3-8b",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": false
  }'

Python example

import requests

r = requests.post(
    "http://localhost:8787/v1/chat/completions",
    headers={
        "Authorization": "Bearer nf_demo_YOUR_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "qwen3-8b",
        "messages": [{"role": "user", "content": "Hello"}],
    },
    timeout=60,
)
print(r.json()["choices"][0]["message"]["content"])

Authentication

Send your API key as a Bearer token: Authorization: Bearer nf_demo_<key>. Keys are created in the dashboard (demo) and shown once at creation. Only key prefixes are listed afterwards; full keys are stored hashed server-side. Never share a key, and never put one in a public repository.

Rate limits (demo)

60 requests per minute per key. Exceeding it returns 429. Limits will change before any production launch.

Model list

GET /api/models returns the launch-candidate models and their status. GET /api/health and GET /api/stats report backend health and demo counts; see the status page.

Error codes

CodeMeaning
400Bad request — check the JSON body, model name and messages format.
401Missing or invalid API key.
404Unknown model or endpoint.
429Rate limit exceeded (demo: 60 req/min per key). Wait and retry.
500 / 503Backend or worker error. Retry once; if it persists, the backend or worker is down — check status.

Waitlist

POST /api/waitlist with {"kind": "provider"|"developer", ...fields} — see the registration page. If the backend is unreachable, the form saves locally in your browser instead and tells you so; it never pretends the server received it.