51trust / 100

Chat Completions

by FarOut LLM Gateway in AI models & inference

x402 APIPassing, checked 1 h ago

Fixed-price chat completions for glm-5.2 on FarOut: flat $0.002 per call (includes up to 4,000 input + 1,000 output tokens). Rate: $0.011/1M input tokens, $0.035/1M output tokens. Pay with USDC on Base using x402. No API key, no account, no prepaid balance.

POST https://farouter.tech/v1/models/glm-5.2/chat/completions

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
21.4%
Response time
556 ms typical, 556 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://farouter.tech/v1/models/glm-5.2/chat/completions" \
  -H "content-type: application/json" \
  -d '{"max_tokens":50,"messages":[{"content":"hi","role":"user"}],"model":"glm-5.2"}'
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%2Ffarouter.tech%2Fv1%2Fmodels%2Fglm-5.2%2Fchat%2Fcompletions
const res = await pay("https://farouter.tech/v1/models/glm-5.2/chat/completions", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"max_tokens":50,"messages":[{"content":"hi","role":"user"}],"model":"glm-5.2"}),
});
console.log(await res.json());

Example input

{
  "max_tokens": 50,
  "messages": [
    {
      "content": "hi",
      "role": "user"
    }
  ],
  "model": "glm-5.2"
}

Example output

{
  "choices": [
    {
      "finish_reason": "stop",
      "message": {
        "content": "Hello! How can I help?",
        "role": "assistant"
      }
    }
  ],
  "usage": {
    "completion_tokens": 8,
    "prompt_tokens": 6
  }
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402626 ms$0.002
5 h agoPassed402556 ms$0.002
9 h agoPassed402550 ms$0.002
13 h agoTimed out---
17 h agoTimed out---
21 h agoTimed out---
25 h agoTimed out---
29 h agoTimed out---
34 h agoTimed out---
38 h agoTimed out---
41 h agoTimed out---
46 h agoTimed out---
2 days agoTimed out---
2 days agoTimed out---