78trust / 100

Chat Completions

by OpenRelay in AI models & inference

x402 APIPassing, checked 25 min ago

OpenAI-compatible chat completion. Pay per request in USDC via x402: no signup, no API keys. Price scales with prompt size and max_tokens.

POST https://api.laminarity.uk/v1/chat/completions

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
144 ms typical, 179 ms slowest 5%
Last check
25 min ago
Next check
in 3 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.laminarity.uk/v1/chat/completions" \
  -H "content-type: application/json" \
  -d '{"max_tokens":256,"messages":[{"content":"Hello","role":"user"}],"model":"MiniMaxAI/MiniMax-M2.7"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.laminarity.uk%2Fv1%2Fchat%2Fcompletions
const res = await pay("https://api.laminarity.uk/v1/chat/completions", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"max_tokens":256,"messages":[{"content":"Hello","role":"user"}],"model":"MiniMaxAI/MiniMax-M2.7"}),
});
console.log(await res.json());

Example input

{
  "max_tokens": 256,
  "messages": [
    {
      "content": "Hello",
      "role": "user"
    }
  ],
  "model": "MiniMaxAI/MiniMax-M2.7"
}

Example output

{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Hello!",
        "role": "assistant"
      }
    }
  ],
  "id": "chatcmpl-example",
  "model": "MiniMaxAI/MiniMax-M2.7",
  "object": "chat.completion",
  "usage": {
    "completion_tokens": 3,
    "prompt_tokens": 9,
    "total_tokens": 12
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
25 min agoPassed402129 ms$0.001
5 h agoPassed402135 ms$0.001
8 h agoPassed402144 ms$0.001
11 h agoPassed402229 ms$0.001
15 h agoPassed402179 ms$0.001
19 h agoPassed402107 ms$0.001
22 h agoPassed402146 ms$0.001