Documentation
Cubic Docs
Full documentation is coming soon. Here's the gist.
Call a completion
Authenticate with a Cubic API key and reference the cube by its public ID. The cube fixes the models, strategy, and output contract; requests may optionally override models, completion parameters, or the callback URL per call.
curl -X POST https://api.cubic.dev/v1/completions \
-H "Authorization: Bearer mxk_..." \
-H "Content-Type: application/json" \
-d '{"prompt_id":"prmt...","variables":{"name":"Ada"}}'Async completions
If a cube defines a callback URL (or the request overrides one), the endpoint returns 202 immediately and a worker POSTs the signed result to your callback URL (verify the X-Maxwell-Signature header).
Strategies
- Fallback — try models in order until one succeeds. Accepts a single input set, or a list of input sets to run as a batch.
- Broadcast — call all models in parallel; return all.
- Contest — contestants generate; an adjudicator picks the winner.
- Batch — a fallback cube called with multiple input sets; each set runs as a fallback completion in parallel, optionally merged. It's the same engine as fallback, just with batched inputs.