/api/cogs/config
GPU hardware catalogue, starter templates, output kinds, markup
curl -s "https://app.nz/api/cogs/config"Cogs API — GPU model hosting
Run an arbitrary Cog (Replicate-style) container as an autoscaling, scale-to-zero GPU inference endpoint. Register a model once (image, hardware, optional input schema); the first prediction cold-starts a GPU pod (RunPod on-demand instances under the hood, or free local GPU headroom when the host opts in), proxies to the container’s /predictions endpoint, and an idle reaper scales it back to zero — an idle model costs nothing. Every prediction is billed at machine time times the same platform markup used across app.nz. GET /api/cogs/config is public so the studio can render before sign-in. One-click deploy: link (or badge) any cog with https://app.nz/deploy?image=…&name=…&hardware=… — the studio opens pre-filled, one press to register. Media in and out ride the JSON body as data: URIs or https URLs, so audio-to-audio models work first-class: the audex-s2s template (NVIDIA Nemotron-Labs-Audex-2B, open source at replicatecog/audex) takes a spoken turn and returns transcript, reply text, and reply audio in one prediction — it powers /spaces/audio-to-audio.
name*stringModel display name.image*stringContainer image, e.g. r8.im/owner/model or your own registry image.hardwarestringA GPU machine id (gpu-t4, gpu-rtx3090, gpu-rtx4090, gpu-a40, gpu-l40s, gpu-a100, gpu-h100), or "auto"/omitted to pick the cheapest GPU that fits minVramGb.schemaobjectOptional { inputs: [{name,type,description,default,required,choices,min,max,order}], outputKind }. Omitted schemas are introspected from the container’s /openapi.json on first warm-up.idleSecondsintegerIdle window before scale-to-zero (default 120).minVramGbintegerModel’s VRAM floor, used for auto hardware selection.curl -sX POST https://app.nz/api/cogs \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"fast-vfx","image":"r8.im/lee101/fast-vfx","hardware":"gpu-rtx4090"}'
# -> {"model":{"id":"cog_...","status":"idle",...}}
curl -sX POST https://app.nz/api/cogs/cog_.../predict \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"input":{"video":"https://example.com/clip.mp4","num_levels":25}}'
# -> {"prediction":{"id":"pred_...","status":"starting"}}
# Poll for the result (a cold start can take a couple of minutes)
curl -s https://app.nz/api/cogs/predictions/pred_... \
-H "Authorization: Bearer pk_live_..."
# Audio-to-audio (audex-s2s template): one spoken turn per prediction
curl -sX POST https://app.nz/api/cogs/cog_.../predict \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"input":{"task":"converse","audio":"data:audio/webm;base64,...","system_prompt":"You are a cheerful pirate captain."}}'
# -> output: {"transcript":"...","response_text":"...","audio":"data:audio/mpeg;base64,..."}/api/cogsList your registered modelsPOST/api/cogsRegister a model (name, image, hardware, schema, idleSeconds, minVramGb)GET/api/cogs/{id}Model detail plus its 20 most recent predictionsDELETE/api/cogs/{id}Delete a model (tears down any warm pod first)POST/api/cogs/{id}/warmProactively cold-start the podPOST/api/cogs/{id}/sleepScale the model to zero nowPOST/api/cogs/{id}/predictRun a prediction asynchronously (input) — poll for the resultGET/api/cogs/{id}/predictionsList a model’s recent predictions (up to 50)GET/api/cogs/predictions/{id}Poll a prediction by id — status, output, cost, timing