$0.009
per call · USD Coin on Base
gpt-4o-mini API call (~128 tokens)
Endpoint
POST https://token4u.ai/v1/chat/completions1.7k
Calls / 30d
2
Unique payers / 30d
Aug 20
Last called
upto
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://token4u.ai/v1/chat/completions", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"messages": [
{
"content": "Hello, how are you?",
"role": "user"
}
],
"model": "gpt-4o-mini"
}),
});
const data = await res.json();cURL
curl -X POST \
"https://token4u.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{"messages":[{"content":"Hello, how are you?","role":"user"}],"model":"gpt-4o-mini"}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello! How can I help you today?",
"role": "assistant"
}
}
],
"created": 1753000000,
"id": "chatcmpl-abc123",
"model": "gpt-4o-mini",
"object": "chat.completion",
"usage": {
"completion_tokens": 8,
"prompt_tokens": 10,
"total_tokens": 18
}
}Payment details
Pay to
0x3ccc6565511f404716cad2d578851ff3ff95fd85Asset
USD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913NetworksBase, alipay
Schemesupto, nvm:erc4337, alipay:a2m
Is this your API?
Pin it to the top of AI & Inference and the homepage with a featured placement.
More from Token4u AI Chat API & similar services
BlockRun.AI · EXA Contents
blockrun.ai
Extract full text content from specific URLs. Priced at $0.002/URL — total = urls.length × $0.002.
POSTBaseAI & Inference
$0.003 / call2.5k calls / 30d
BlockRun.AI · EXA Search
blockrun.ai
Neural and keyword web search. Optional category filter: company, research paper, news, pdf, github, tweet, personal site, linkedin profile, financial report.
POSTBaseAI & Inference
$0.011 / call1.9k calls / 30d
BlockRun.AI · EXA Answer
blockrun.ai
Get an AI-generated answer to a question grounded in live web search results.
POSTBaseAI & Inference
$0.011 / call1.9k calls / 30d