Use YYClaw API to call 50+ AI models (Claude, Gemini) with on-chain stablecoin payments. Check balance, usage, list models, and make API calls — all with a single API key.
YYCLAW_API_KEY — Your API key (starts with sk-yy-). Get one at https://crypto.yyclaw.cc by connecting your wallet.YYCLAW_BASE_URL — Override gateway URL (default: https://crypto.yyclaw.cc)Base URL: https://crypto.yyclaw.cc
All endpoints use Authorization: Bearer <YYCLAW_API_KEY> header.
text
GET /v1/balance
Returns on-chain allowance (authorized amount), spent, remaining, call count, per-chain breakdown, and wallet address.
Response:
json
{
"balance": 50.00,
"spent": 2.34,
"remaining": 47.66,
"calls": 28,
"chains": { "bsc": 50.00, "base": 0 },
"wallet": "0x..."
}
text
GET /v1/usage?limit=20
Returns total calls, total spent, and recent call logs.
Response:
json
{
"total_calls": 28,
"total_spent": 2.34,
"logs": [
{ "model": "gemini-3-flash-fixed", "cost": 0.02, "status": "success:0xabc...", "created_at": "2026-03-18 12:00:00" }
]
}
text
GET /v1/models
Returns all enabled models with per-call pricing. No auth required.
text
POST /v1/chat/completions
Content-Type: application/json
{
"model": "gemini-3-flash",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}
The -fixed suffix is auto-appended if omitted. Supports streaming ( "stream": true).
ShortModelPrice/callgemini-3-flashgemini-3-flash-fixed$0.020gemini-2.5-flashgemini-2.5-flash-fixed$0.010gemini-3-pro-previewgemini-3-pro-preview-fixed$0.080claude-haiku-4.5claude-haiku-4.5-fixed$0.064claude-sonnet-4-6claude-sonnet-4-6-fixed$0.100claude-opus-4.6claude-opus-4.6-fixed$0.160
When this skill is active, use curl or any HTTP client to interact with YYClaw.
bash
echo $YYCLAW_API_KEY
If not set, ask the user to provide it or direct them to https://crypto.yyclaw.cc to get one.
bash
curl -s -H "Authorization: Bearer $YYCLAW_API_KEY" https://crypto.yyclaw.cc/v1/balance | python3 -m json.tool
bash
curl -s -H "Authorization: Bearer $YYCLAW_API_KEY" https://crypto.yyclaw.cc/v1/usage?limit=10 | python3 -m json.tool
bash
curl -s https://crypto.yyclaw.cc/v1/models | python3 -m json.tool
bash
curl -s -X POST https://crypto.yyclaw.cc/v1/chat/completions \
-H "Authorization: Bearer $YYCLAW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gemini-3-flash","messages":[{"role":"user","content":"Hello"}]}'
python
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["YYCLAW_API_KEY"],
base_url="https://crypto.yyclaw.cc/v1"
)
response = client.chat.completions.create(
model="gemini-3-flash",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)
javascript
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.YYCLAW_API_KEY,
baseURL: 'https://crypto.yyclaw.cc/v1'
});
const res = await client.chat.completions.create({
model: 'gemini-3-flash',
messages: [{ role: 'user', content: 'Hello' }]
});
console.log(res.choices[0].message.content);
CodeMeaningAction401Invalid API keyCheck YYCLAW_API_KEY402Insufficient balance/allowanceUser needs to approve more tokens at dashboard404Model not foundCheck /v1/models for available models503Model upstream not configuredContact admin