Developer documentation
API reference
Choose the API for your authentication method. Each has its own OpenAPI document and base URL.
Choose a spec
x402: pay from a wallet
Use x402 for pay-per-call requests without an API key. A request without payment returns 402 with payment offers; a paying client signs an offer and retries.
Base URL:
https://ask.singitai.app/v1API key: use server code or an SDK
Create a key in the SingIt app. Send
Authorization: Bearer $SINGIT_API_KEYorx-api-key. Keep the key in server code; a nonempty Origin header is rejected.Base URL:
https://app.singitai.app/v1
The key spec marks routes that require the proxy/balance service. Keys have daily and per-request caps. Paid requests are limited to 60 per minute per key; configured free chat models have separate quotas. Exa requires the search scope; the tools scope applies to paid MCP tools.
Try a request
Probe x402 without payment
This example is verified in the repository’s first-paid-call guide (unpaid probe checked 27 October 2026); it was not rerun for this page. Expect HTTP 402 and a payment-required header. This curl does not sign or pay.
curl -i https://ask.singitai.app/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"deepseek-v4.1-flash","max_tokens":200,"messages":[{"role":"user","content":"Say hello in five words."}]}'Send a key-authenticated request
Set SINGIT_API_KEY in your server environment. This illustrative request can incur a charge and was not run for this page.
curl https://app.singitai.app/v1/chat/completions \
-H "Authorization: Bearer $SINGIT_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"deepseek-v4.1-flash","max_tokens":200,"messages":[{"role":"user","content":"Say hello in five words."}]}'Read errors
Key API gateway errors use {"error":{"message":"…","type":"…","code":"…"}}. Messages routes use the Anthropic form {"type":"error","error":{"type":"…","message":"…"}} for ApiError refusals; HTTP-layer content-type errors can use the OpenAI form. Upstream errors can be relayed.
For keys, 401 invalid_api_key means missing, expired or revoked credentials. A 403 browser_request rejects browser use; scope_missing rejects a missing search scope. A 404 not_found can mean a route is disabled. A 429 insufficient_quota means the daily key cap is exhausted, including in-flight reservations; rate_limit_exceeded means slow down. Read the message and code together.
For x402 error meanings and retry guidance, read SingIt Ask ERRORS.md.
Read model health
GET https://ask.singitai.app/health reports per-model status. models_summary counts models in each status; inspect models for individual entries. These are observed outcomes, not a guarantee for the next call.
up: the observed failure rate is at most 20%.degraded: the failure rate is above 20% and at most 50%.down: the failure rate is above 50%.insufficient_data: fewer than five attempts, too few to classify by failure rate.unavailable: the model is temporarily unservable; this takes precedence over the other statuses.
windowHours describes the observation window (24 hours), and attempts counts attempts in it. lastOutcome is the latest recorded success or failure, which may precede the window. sellerFailures counts no-healthy-seller and minimum-discount failures; failureReasons groups failures by reason in the window. reason records the latest failure reason, even if a later call succeeded. See the status page for a readable view.
Discover endpoints
The live x402 resource list is at ask.singitai.app/.well-known/x402. The site alias singitai.app/.well-known/x402 redirects there so the list stays current. /llms.txt provides a text entry point. The site’s /openapi.json redirects to the x402 spec; use /openapi-keys.json for key authentication.