Contracts

Permanent model names you control from the dashboard

What a contract is

A contract is a permanent model name you own — for example contract/support-agent — that points at a catalog model you choose. You promote or roll back revisions from the dashboard’s Stable endpoints page; your code keeps calling the same contract name. No silent model swaps: what serves the request only changes when you change it.

Calling a contract

Send the same request you’d send to any model, with model set to contract/{slug}.

$curl https://api.singularityapi.dev/v1/chat/completions \
> -H "Authorization: Bearer $SINGULARITY_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "model": "contract/support-agent",
> "messages": [{"role": "user", "content": "Say hello."}]
> }'

Reading the response

  • model in the response body is the served target — the catalog model that actually ran the request, e.g. deepseek-v4-flash.
  • The x-singularity-contract-revision response header records the exact revision that served the request, e.g. support-agent@3.
  • The receipt for the request carries a contract block: {"slug": "support-agent", "revision": 3}.

Rules

  • A contract slug is 2–63 lowercase alphanumeric characters and hyphens, and may not start with contract.
  • Requests cannot pin a revision — the active revision is resolved server-side, per request.
  • Promotions and rollbacks take effect on the next request. No deploy required.
  • An unknown or malformed contract name returns 404 model_not_found. See Errors & Rate Limits.
  • Contracts require API-key auth, same as any inference call.

Creating and promoting contracts is dashboard-only, on the Stable endpoints page at https://app.singularityapi.dev. There is no public API for contract management.