Create a text completion
OpenAI-compatible text completion.
OpenAI-compatible text completion.
Authorization
bearerAuth A ModelBeat API key, prefixed mb_live_, sent as Authorization: Bearer <key>.
Keys are issued in the ModelBeat console and are scoped to one tenant. The
example value used throughout this document
(mb_live_EXAMPLE_NOT_A_REAL_KEY_00000000000000000000) is a placeholder and
will not authenticate.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "prompt": "string" }'{ "id": "string", "object": "string", "model": "string", "system_fingerprint": "string", "choices": [ { "index": 0, "finish_reason": "string", "message": {} } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "cost": { "input_tokens_cost": 0, "output_tokens_cost": 0, "reasoning_tokens_cost": 0, "citation_tokens_cost": 0, "search_queries_cost": 0, "request_cost": 0, "total_cost": 0 } }, "extra_fields": { "request_type": "string", "routing_info": { "provider": "string", "model": "string", "key": "string", "resolved_key_alias": { "model_id": "string", "model_name": "string", "model_family": "string" }, "is_fallback": true, "primary_provider": "string", "primary_model": "string" }, "latency": 0, "chunk_index": 0 }}Create a chat completion POST
OpenAI-compatible chat completion. ModelBeat reserves a worst-case cost hold before routing, then settles it against realized usage after the provider responds. A `402` means the hold exceeded the available prepaid balance.
List available models GET
Returns the ModelBeat model catalog in the OpenAI `/v1/models` list shape. Authenticated and rate-limited, but never metered — no balance hold is taken. The catalog is served from the ModelBeat registry, not from any upstream provider. It lists only models ModelBeat serves, with `owned_by: "modelbeat"`.