Api referenceChat
List stored chat completions
List chat completions created with store: true, scoped to the caller's organization. Cursor-paginated by creation time; filter by model and metadata.
Authorization
bearerAuth AuthorizationBearer <token>
A Maniac API key, sent as Authorization: Bearer <key>. (Internal service-to-service calls use a separate internal service key and are not documented here.)
In: header
Query Parameters
model?string
Filter by the model used to generate the completions.
metadata?
Filter by metadata key/value pairs, e.g. metadata[key]=value (repeatable; ANDed).
after?string
A cursor: the id of the last completion from the previous page. Results start strictly after it.
limit?integer
Number of completions to return (1–100, default 20).
order?string
Sort by creation time: asc (default) or desc.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/chat/completions"{ "object": "list", "data": [ { "id": "string", "object": "chat.completion", "created": 0, "model": "string", "choices": [ { "index": 0, "message": { "role": "string", "content": "string", "tool_calls": [ { "id": "string", "type": "function", "function": { "name": "string", "arguments": "string" } } ], "reasoning": "string" }, "finish_reason": "stop", "logprobs": null } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0, "audio_tokens": 0 } }, "provider": "string", "warnings": [ "string" ], "service_tier": "default", "performance_mode": "standard", "metadata": { "property1": null, "property2": null } } ], "first_id": "string", "last_id": "string", "has_more": true}{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}