G

GEDX402 Chat · Chat Completions

by GEDX402 Chat

POSTBase

$0.001

per call · USD Coin on Base

Multi-model chat completions. POST messages[] and set model to any LLM id from GET /v1/models; dynamic USDC pricing scales with model and token usage. Hero: GET /heroes/chat-completions.

Endpoint

POST https://chat.gedx402.com/v1/chat/completions

152

Calls / 30d

9

Unique payers / 30d

Sep 8

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://chat.gedx402.com/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "max_tokens": 128,
    "messages": [
      {
        "content": "Say hello in one sentence.",
        "role": "user"
      }
    ],
    "model": "fast"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://chat.gedx402.com/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -d '{"max_tokens":128,"messages":[{"content":"Say hello in one sentence.","role":"user"}],"model":"fast"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Hello!",
        "role": "assistant"
      }
    }
  ],
  "id": "chatcmpl-example",
  "object": "chat.completion"
}

Payment details

Pay to0xb3c2776ce3f99cb3366520c27b4ac5d436942ab6
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of AI & Inference and the homepage with a featured placement.

Get featured →

More from GEDX402 Chat & similar services