78trust / 100

Llm Chat

by Maxwell x402 in AI models & inference

x402 APIPassing, checked 57 min ago

AI assistant from the Maxwell International LLM service (model maxwell-chat), OpenAI-style chat completion: POST {model, messages, max_tokens}. Priced before it runs: prompt tokens (yours plus ~860 of service instructions) x $1.50/M + max_tokens x $3.00/M + $0.005; max_tokens is your spend limit (short question, max_tokens 80: about $0.0066). Text only. Free model list: GET /v1/llm/models.

POST https://api.maxwellinternational.ai/v1/llm/chat

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
482 ms typical, 755 ms slowest 5%
Last check
57 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.maxwellinternational.ai/v1/llm/chat" \
  -H "content-type: application/json" \
  -d '{"max_tokens":80,"messages":[{"content":"In one sentence: what is x402?","role":"user"}],"model":"maxwell-chat"}'
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.maxwellinternational.ai%2Fv1%2Fllm%2Fchat
const res = await pay("https://api.maxwellinternational.ai/v1/llm/chat", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"max_tokens":80,"messages":[{"content":"In one sentence: what is x402?","role":"user"}],"model":"maxwell-chat"}),
});
console.log(await res.json());

Example input

{
  "max_tokens": 80,
  "messages": [
    {
      "content": "In one sentence: what is x402?",
      "role": "user"
    }
  ],
  "model": "maxwell-chat"
}

Example output

{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {}
    }
  ],
  "id": "llm_a16b44d392baac50b4dcfe4a",
  "model": "maxwell-chat",
  "object": "chat.completion",
  "x402": {
    "billedInputTokens": 370,
    "callId": "llm_a16b44d392baac50b4dcfe4a",
    "maxOutputTokens": 80,
    "priceUsd": 0.005895
  }
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
57 min agoPassed402216 ms$0.0065
5 h agoPassed402536 ms$0.0065
8 h agoPassed40267 ms$0.0065
12 h agoPassed402517 ms$0.0065
15 h agoPassed402482 ms$0.0065
19 h agoPassed40275 ms$0.0065
23 h agoPassed402755 ms$0.0065
26 h agoPassed402891 ms$0.0065
30 h agoPassed402238 ms$0.0065
33 h agoPassed402625 ms$0.0065
37 h agoPassed402518 ms$0.0065
42 h agoPassed402421 ms$0.0065