Models & Receipts

GET /v1/models and GET /v1/receipts

GET /v1/models

Requires an API key. Returns every model in the catalog with its per-endpoint capabilities: context window, max and default output tokens, and current pricing as 12-decimal-place per-million-token strings.

$curl https://api.singularityapi.dev/v1/models \
> -H "Authorization: Bearer $SINGULARITY_API_KEY"

A model entry looks like this:

1{"object": "list", "data": [{"id": "deepseek-v4-flash", "object": "model", "created": 1690000000,
2 "owned_by": "singularityapi", "capabilities": [{"endpoint": "/v1/chat/completions",
3 "context_window_tokens": 1000000, "maximum_output_tokens": 384000, "default_output_tokens": 8192,
4 "pricing": {"input_per_million_usd": "0.081000000000", "output_per_million_usd": "0.162000000000"}}]}]}

Each model’s capabilities array has one entry per endpoint it serves — a model with both chat completions and responses capability has two entries, each with its own limits and pricing.

This endpoint takes no query parameters — any query string returns a 400. Responses are sent with cache-control: no-store, so what you get back is always current: pricing, limits, and the model list itself.

GET /v1/receipts/{receipt_id}

Requires an API key, and only resolves receipts belonging to your own account — an unknown or foreign receipt ID returns 404 receipt_not_found inside the standard error envelope.

$curl https://api.singularityapi.dev/v1/receipts/RECEIPT_ID \
> -H "Authorization: Bearer $SINGULARITY_API_KEY"

A receipt looks like this:

1{
2 "id": "rcpt_...", "object": "route_receipt", "request_id": "req_...",
3 "requested_model": "deepseek-v4-flash", "served_model": "deepseek-v4-flash",
4 "surface": "chat_completions", "requested_contract": null, "contract_passed": false,
5 "state": "settled", "fallbacks_attempted": 0, "attempts_count": 1,
6 "request_transformed": true, "transformed_fields": ["model", "max_tokens"],
7 "usage": {"input_tokens": 123, "output_tokens": 45, "estimated": false},
8 "latency_ms": 812, "total_cost_usd": "0.000123456789",
9 "created_at": "2026-08-03T00:00:00.000000Z", "terminal_at": "2026-08-03T00:00:01.000000Z"
10}

state progresses through the request’s lifecycle to a terminal state. usage and total_cost_usd are null until the receipt reaches that terminal state — poll or wait before reading the final numbers.

For a full field-by-field glossary of the receipt object, see Receipts & Billing.