API
API reference
The API follows the OpenAI Chat Completions format. Anything not listed here is not part of the public surface.
Base URL and authentication
| Base URL | https://api.laminarity.uk/v1 |
| Header | Authorization: Bearer sk-or-… |
| Without a key | paid routes answer 402 with an x402 payment challenge — see x402 |
POST /v1/chat/completions
Creates a model response for a conversation. model and messages are required; max_tokens limits the answer and the worst-case pre-check, stream switches to server-sent events.
POST https://api.laminarity.uk/v1/chat/completions
Authorization: Bearer sk-or-...
Content-Type: application/json
{
"model": "deepseek-ai/DeepSeek-V4-Flash-0731",
"messages": [
{"role": "system", "content": "You are terse."},
{"role": "user", "content": "Name three rivers in Europe."}
],
"max_tokens": 200,
"stream": false
}The response is a standard chat completion object: choices[0].message.content holds the text and usage the token counts.
Response headers
| Header | Meaning |
|---|---|
x-openrelay-charged-usd | What this request cost, in US dollars. |
x-openrelay-balance-usd | Balance left after the request. |
GET /v1/models
Lists the models with their context length and price in US dollars per million tokens. It is free and needs no key.
GET https://api.laminarity.uk/v1/models
{
"data": [
{
"id": "deepseek-ai/DeepSeek-V4-Flash-0731",
"object": "model",
"context_length": 400000,
"pricing": {"prompt": 0.15, "completion": 0.15}
}
]
}Per-model endpoints
For x402 clients each model also has an endpoint where the model is fixed by the URL and model in the body is ignored:
| Model | Endpoint |
|---|---|
| DeepSeek V4 Flash | /v1/deepseek-v4-flash/chat/completions |
| GLM 5.3 Flash | /v1/glm-5.3-flash/chat/completions |
| MiniMax M2.7 | /v1/minimax-m2.7/chat/completions |
Machine-readable descriptions
- OpenAPI 3.1 with x402 payment information
- /.well-known/x402 and APIs.json
- pricing.json and llms.txt