SugarDocs

First request#

Before you start#

  • Sugar is running at its final intended URL.
  • The owner account exists.
  • At least one provider has passed its connection test and exposes a model.
  • You created a member inference key and copied it when shown.

List models:

test -n "$SUGAR_URL" || { echo "Set SUGAR_URL to the deployed origin" >&2; exit 1; }
curl -sS "$SUGAR_URL/api/v1/models" \
  -H "Authorization: Bearer $SUGAR_API_KEY"

Send a non-streaming request through Conduit:

curl -sS "$SUGAR_URL/api/v1/chat/completions" \
  -H "Authorization: Bearer $SUGAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"sugar/conduit","messages":[{"role":"user","content":"Reply with ready."}]}'

Verify#

Confirm the response contains one assistant choice, a model identity and usage. Check the response request ID and verify the request appears in the member's usage view. Revoke the test key and confirm a repeated call returns 401.

If it does not work#

Symptom Check Recovery
Owner bootstrap is refused Whether an owner already exists Bootstrap is a first-run action; use sign-in instead
The key is created but requests return 401 Whether the key is sent as a bearer token See API returns 401 or 403
A request returns no model Whether any provider lane is enabled and qualified See No model is available
The request is refused with every lane ruled out The constraint that excluded them See Every lane is ruled out by the request