Docs

Playground

The playground is a thin client on the live catalog and the real gateway, not a canned demo.

Dashboard → Playground is a chat UI that talks to the same API your production apps use.

Boot sequence

  1. Read ?model= from the URL (Models Try sets this).
  2. GET /api/models/available — enabled catalog, running deployments, Ollama tags on this machine.
  3. If localStorage.od_playground_api_key is empty, POST /api/keys { "name": "Playground" } and store the returned secret.
  4. Run is disabled until there is a key, a model id, and a message.

An empty catalog shows a banner and a link to Models. We do not fall back to a hardcoded GPT list.

What Run sends

POST /api/playground/chat (proxies to ${NEXT_PUBLIC_GATEWAY_URL}/v1/chat/completions) with:

  • Authorization: Bearer <your key>
  • model, messages, stream: true
  • temperature, max_tokens, top_p from the Params rail
  • provider: { sort, allow_fallbacks, order } from the Params rail (sort is omitted when Default)
  • optional image_url parts when the catalog row has vision
  • uploaded .txt / .md / code files inlined as text (native file APIs are noted when the model id is known to support them)

View code prints the equivalent curl / SDK call against your gateway URL.

Media

Dashboard → Media (/dashboard/playground/media) is a separate page for image and video. It uses the same Playground API key and calls /api/playground/images and /api/playground/videos (gateway /v1/images/generations and /v1/videos/generations). Model pickers come from the live /v1/images/models and /v1/videos/models lists.

Dashboard → Studio (/dashboard/studio) is the private GPU image UI. It does not use the chat playground.