Skip to content
laminarity

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 URLhttps://api.laminarity.uk/v1
HeaderAuthorization: Bearer sk-or-…
Without a keypaid 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

HeaderMeaning
x-openrelay-charged-usdWhat this request cost, in US dollars.
x-openrelay-balance-usdBalance 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:

ModelEndpoint
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