Coding agent? One paste
Claude Code, Cursor, Codex and other coding agents can use GlianaAI with no config file. Install the GlianaAI agent skills and give them a key from the dashboard (top up in rupiah or USDC). The skills teach the agent to find the right model or tool, quote the price before spending, run it and hand back the result. The dashboard shows this line with your key already filled in when you create one.
macOS / Linux
npx skills add Gliana-Labs/skills -g -y echo 'export GLIANA_API_KEY=gk_your_key' >> ~/.$(basename "$SHELL")rc
Windows (PowerShell)
npx skills add Gliana-Labs/skills -g -y setx GLIANA_API_KEY gk_your_key
Needs Node.js (for npx). Open a new terminal afterwards, then ask your agent for an image, a video or a lookup. Free Indonesian lookups need no key at all. Skills and tests: github.com/Gliana-Labs/skills.
Use your key in any app
Anything that takes an OpenAI-compatible provider works with these values: Open WebUI, LibreChat, Cline,
Continue, n8n, LiteLLM and the OpenAI SDKs. The model list loads from GET /v1/models.
Base URL https://api.glianalabs.com/v1 API key gk_your_key Models loaded from /v1/models (or type one, e.g. claude-sonnet-5.5) Embedding bge-m3
Codex CLI
Put this in ~/.codex/config.toml, set GLIANA_API_KEY, run codex. It talks to POST /v1/responses, and any chat model we sell
works there. Codex's own web search tool is not available.
# ~/.codex/config.toml model = "claude-sonnet-5.5" model_provider = "gliana" [model_providers.gliana] name = "GlianaAI" base_url = "https://api.glianalabs.com/v1" env_key = "GLIANA_API_KEY" wire_api = "responses"
Embeddings for search and RAG
POST /v1/embeddings in the OpenAI format: bge-m3, 1024 dimensions, Indonesian and 100+ other languages,
$0.02 per million tokens ($0.0001 minimum a call), up to 2048 texts a request.
from openai import OpenAI client = OpenAI(base_url="https://api.glianalabs.com/v1", api_key="gk_your_key") vecs = client.embeddings.create(model="bge-m3", input=["harga tiket kereta", "train fare"]) # LangChain: OpenAIEmbeddings(model="bge-m3", base_url="https://api.glianalabs.com/v1", # api_key="gk_your_key", check_embedding_ctx_length=False)
Import into Postman
Every endpoint you can call with a key, as a ready Postman collection with an example body on each request.
In Postman choose Import, paste this link, then set the collection variable gliana_key to your key from the dashboard.
Start with the free balance check at the top.
https://api.glianalabs.com/postman.json
Insomnia, Bruno, Hoppscotch and other OpenAPI clients: import api.glianalabs.com/openapi.dashboard.json and set the bearer token to your key. Both are generated from the live API, so importing again picks up new models and tools.
Start hereFirst paid call in 5 minutes
Driving an agent — Claude Code, Cursor, or your own? Hand it one URL and it can work the rest out. Everything here is free; only the call at the end costs anything.
# 1. hand your agent the guide
curl https://api.glianalabs.com/skill.md
# 2. ask which endpoint fits — free, no wallet needed
curl 'https://api.glianalabs.com/v1/consult?intent=transcribe%20a%20podcast'
# 3. call it. the first response is a 402 with the price; pay and retry
curl -X POST https://api.glianalabs.com/v1/infer \
-H 'content-type: application/json' \
-d '{"model":"nano-banana-2","prompt":"a red apple"}'Already on MCP? Install the server and your client picks all of this up automatically.
Want your agent to know the whole catalog first? Give it ai.glianalabs.com/llms.txt (the product on one page) or ai.glianalabs.com/llms-full.txt (every model and tool with its price, in one file).
Or set it up by hand
The same thing, step by step, if you would rather wire it yourself.
1. Install
JavaScript / shell pay via mppx (Tempo); Python, Go, and Rust pay via the x402 SDKs (USDC on Base) — pick your tab in step 3.
npm i mppx viem # JS / shell (Tempo) pip install "x402[requests]" eth-account # Python (Base)
2. Fund a payer wallet
Your balance lives in your own account, not ours.
npx mppx account create # Tempo: prints your 0x address — fund it with USDC # or for the x402 route: any Base wallet holding USDC (MetaMask etc.)
3. Pick a model, copy the code
# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/infer \
-H "content-type: application/json" \
-d '{
"model": "bytedance/seedance-2.0",
"prompt": "<your prompt>"
}'
# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/infer \
-J '{"model": "bytedance/seedance-2.0", "prompt": "<your prompt>"}'Replace the <…> placeholders (and the example file URLs) — the body shows only what you must supply: usually a prompt, plus any image/video URL the model needs. The API fills every other parameter from the model’s schema (GET /v1/schema?model=). cURL and JavaScript auto-pay via mppx (Tempo); Python, Go, and Rust pay USDC on Base via the x402 SDKs.
Pricing depends on the rail
You always pay the model price; each rail adds its own cost on top so the published price lands with us.
- USDCTempo, Base, or Solana — you pay the exact model price; your wallet covers network gas directly. No flat fee.
- RupiahTop up a prepaid balance in rupiah (QRIS, virtual account or e-wallet) on the dashboard, then call with an API key. Each call deducts the same model price — no gas, no per-call fee.
- Card(coming soon) International cards.
High volume — payment channels
Making many calls? Open one Tempo payment channel and pay each call with an off-chain voucher at POST /v1/session/infer — same body as /v1/infer. You deposit once, each call is paid with a signed voucher
instead of its own on-chain transaction, and whatever you did not spend returns to your wallet when the channel closes.
We never hold the deposit; it sits in the on-chain escrow. mppx opens and manages the channel
(tempo.session). Questions about volume? Get in touch.
Endpoints
Fair-use rate limit: ~120 requests/min per IP. Doing more than that? Contact us and we'll raise it for you.
File inputs (image-to-video, video-to-video, transcription)
take a public URL. Got a local file? POST it to /v1/media with its Content-Type (video/image/audio, ≤40 MB) — it returns { url }, which you pass
straight into the model's file field (e.g. video_uri). No payment, no key.
OpenAI-style endpoints
Prefer the OpenAI shape? Use a capability endpoint grouped by modality and pass the model in the body — same pay-per-call charge as /v1/infer, media returns { data: [{ url }] }, transcription returns { text }.
# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/images/generations \
-H "content-type: application/json" \
-d '{
"model": "seedream-4.5",
"prompt": "a red apple on a table"
}'
# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/images/generations \
-J '{"model": "seedream-4.5", "prompt": "a red apple on a table"}'The per-model /x402/<model> paths still work too — pick whichever fits your client.
LLM chat (OpenAI-compatible)
Point your existing OpenAI client at us — swap the base URL, keep your SDK —
and chat with any of the 61 chat models we sell (Claude, GPT, Gemini, Grok and open-weight models — see the list),
pay-per-call. Billing is a pre-charged ceiling: (estimated input tokens + your max_tokens) at the model's per-1M rates — set max_tokens to bound spend; the response returns real usage.
# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/chat/completions \
-H "content-type: application/json" \
-d '{
"model": "grok-4.5",
"messages": [{"role": "user", "content": "Summarize x402 in one sentence."}],
"max_tokens": 256
}'
# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/chat/completions \
-J '{"model": "grok-4.5", "messages": [{"role": "user", "content": "Summarize x402 in one sentence."}], "max_tokens": 256}'"OpenAI-compatible" means the request and response shapes — payment replaces the API key.
A vanilla OpenAI SDK with only the base URL swapped will get HTTP 402 Payment Required: that's the payment step, not a bug.
Wrap the SDK's fetch with a payment client (one line with mppx — see the
snippet on the homepage) and it pays the 402 and retries automatically.
Text models are listed in GET /v1/models (category text). stream: true streams incrementally (SSE, OpenAI chunk format); tools/tool_choice do OpenAI function calling (response returns tool_calls, send results back as role: "tool"); vision models take image_url content parts; top_p and temperature pass through where the provider supports them.
Utility tools
Beyond models — flat pay-per-call utilities agents reach for, same payment gate.
AI primitives
9Search, embeddings, moderation and extraction an agent composes with.
Image rendering
8Turn text or a URL into a social card, thumbnail or meme.
Web data
5Read a page and get back data instead of HTML.
Market data
10Token prices, pairs, TVL, gas and FX — live rates.
Company filings
10What US public companies reported to the SEC. Reported, never traded.
Indonesian data
9Regions, ID numbers, tax IDs, QRIS and prayer times. Free.
Identity & faces
5Face detection, comparison and ID document reading.
OSINT & verification
6Vet a domain, email, phone or IP from open sources before you trust it.
Security checks
9Find leaked credentials, lookalike domains, missing headers and spoofed senders.
# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/tools/address-id \
-H "content-type: application/json" \
-d '{
"address": "Jl. Medan Merdeka Barat No. 12 RT 03/RW 05, Gambir, Gambir, Jakarta Pusat 10110"
}'
# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/tools/address-id \
-J '{"address": "Jl. Medan Merdeka Barat No. 12 RT 03/RW 05, Gambir, Gambir, Jakarta Pusat 10110"}'Recipes
Multi-model pipelines in one paid call — chain models into a result a single endpoint can't make. One charge (the sum of each step); you get every step's output plus the final url. The image-first path is 3–8× cheaper than a native text-to-video model and gives better subject control.
# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/recipes/image-to-video \
-H "content-type: application/json" \
-d '{
"prompt": "an italian-brainrot cat-shark, 3d meme",
"motionPrompt": "it dances"
}'
# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/recipes/image-to-video \
-J '{"prompt": "an italian-brainrot cat-shark, 3d meme", "motionPrompt": "it dances"}'Returns every step plus the final url — { image: {url}, video: {url}, url }.
Override the models per call with { imageModel, videoModel }.
Brainrot 🧠
A random Italian-brainrot creature as an image — the brainrot-character model (also at /v1/images/generations) — or a one-call video with audio via the recipe. Pass an optional reference_image to brainrot-ify your own picture.
# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/images/generations \
-H "content-type: application/json" \
-d '{
"model": "brainrot-character"
}'
# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/images/generations \
-J '{"model": "brainrot-character"}'Host a website
Your agent built a page; give it a URL. POST /v1/tools/site-deploy takes the files as base64 and returns a live HTTPS address on utus.dev — $0.05 a deploy, which keeps the site up 30 days. Same
payment as every other call: x402, MPP, or a prepaid gk_ key.
curl https://api.glianalabs.com/v1/tools/site-deploy \
-H "authorization: Bearer $GLIANA_KEY" -H "content-type: application/json" \
-d '{"name":"toko kue","files":{"index.html":"'"$(base64 -w0 index.html)"'"}}'
→ { "url": "https://toko-kue-3f9a.utus.dev", "site": "toko-kue-3f9a",
"key": "ut_…", "expiresAt": 1764172800000 }- Update it: send
{ site, key, files }again — the files are replaced and 30 days are added. Keep the key; it is the only way back in. - Delete it, free:
POST /v1/sites/delete { site, key }. Otherwise it is erased when its time runs out. - Name is optional and gets a short random suffix; names that read like a bank, wallet, login or official page are refused before you pay.
- Static only: HTML, CSS, JS, images, fonts — no server code, no forms.
index.htmlrequired; up to 2,000 files and 17 MB. - Want server code, forms, a database or your own domain? That is an Utus account.
Agent discovery
GlianaAI is indexed on the major payment-protocol directories, so an agent can find and
pay our endpoints with no hand-configuration — over MPP (/v1/infer), x402 (/x402/<model>), Algorand (/a402/…)
and BNB Smart Chain (/b402/…).
The spec lives at /openapi.json.
Add the skills to any agent client:
npx agentcash add https://api.glianalabs.com
Every model also has a native x402 resource at /x402/<model> (USDC on Base or Solana). Pay it
with the x402 client — the same code pays /a402/… (Algorand) and /b402/… (BNB Smart Chain), which carry the utility
tools and recipes; only the chain scheme you register changes:
import { x402Client, wrapFetchWithPayment } from '@x402/fetch'
import { ExactEvmScheme } from '@x402/evm/exact/client'
import { privateKeyToAccount } from 'viem/accounts'
const client = new x402Client()
.register('eip155:8453', new ExactEvmScheme(privateKeyToAccount(process.env.WALLET_KEY)))
const fetchWithPay = wrapFetchWithPayment(fetch, client)
await fetchWithPay('https://api.glianalabs.com/x402/nano-banana-2', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ prompt: 'a red fox' }),
}) // 402 -> auto-paid in USDC on Base -> imageUse via MCP
GlianaAI ships a Model Context Protocol server, so Claude Code, Cursor,
Codex, Claude Desktop and any MCP client can browse models and generate directly. Tools: list_models, get_price, get_schema, generate, list_tools, tool, recipe.
Claude Code — one command installs the server and a skill that tells Claude when to use it:
/plugin install gliana-ai --marketplace Gliana-Labs/gliana-mcp
Cursor — add to Cursor in one click,
then replace gk_your_key. Codex and every other client take the same three lines:
[mcp_servers.gliana-ai]
command = "npx"
args = ["-y", "gliana-ai-mcp"]
env = { GLIANA_API_KEY = "gk_your_key", GLIANA_MAX_PER_CALL_USD = "1", GLIANA_MAX_PER_DAY_USD = "10" }{
"mcpServers": {
"gliana-ai": {
"command": "npx",
"args": ["-y", "gliana-ai-mcp"],
"env": {
"GLIANA_API_KEY": "gk_your_key",
"GLIANA_MAX_PER_CALL_USD": "1",
"GLIANA_MAX_PER_DAY_USD": "10"
}
}
}
}GLIANA_API_KEY is a prepaid key from the dashboard — no wallet,
nothing to sign. Prefer paying from your own wallet with no account? Use GLIANA_WALLET_KEY_FILE (Base / Tempo) or GLIANA_SOLANA_KEY_FILE instead; the key is read locally and never sent.
The two MAX variables are spending caps: every paid call is priced from the
gateway's own 402 quote before anything is paid, and refused, free, if it would pass either.
Prefer zero-install? A hosted server is live at mcp.glianalabs.com/mcp (Streamable HTTP) for browsing,
pricing, schemas and the free tools — no key.
From a Cloudflare Agent
The gateway speaks MPP, the payment protocol Cloudflare's Agents SDK documents for paying services, so an Agent calls GlianaAI with plain mppx — no
account, no API key, no adapter. maxAtomicAmount is the spending cap:
mppx refuses any call priced above it before signing anything (USDC units, so "200000" = $0.20).
import { Agent } from "agents";
import { Mppx, evm } from "mppx/client";
import { Assets } from "mppx/evm";
import { privateKeyToAccount } from "viem/accounts";
export class StudioAgent extends Agent<Env> {
async image(prompt: string) {
const mppx = Mppx.create({
methods: [
evm({
account: privateKeyToAccount(this.env.WALLET_KEY),
currencies: [Assets.base.USDC], // USDC on Base
maxAtomicAmount: "200000", // refuse any call over $0.20, before signing
}),
],
polyfill: false,
});
const res = await mppx.fetch("https://api.glianalabs.com/v1/infer", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ model: "nano-banana", prompt }),
});
if (!res.ok) throw new Error(`GlianaAI ${res.status}`);
return res.json(); // { model, costMicroUsd, output: { url } }
}
}Would rather not hold a wallet key in the Worker? Use a prepaid key from the dashboard and plain fetch — the call returns 200 directly, and the key carries its own daily cap:
const res = await fetch("https://api.glianalabs.com/v1/infer", {
method: "POST",
headers: {
"content-type": "application/json",
authorization: `Bearer ${this.env.GLIANA_API_KEY}`, // gk_…
},
body: JSON.stringify({ model: "nano-banana", prompt }),
});Needs mppx 0.15 or later; currencies is required on Base, since the
challenge names the token only by address. Tested end to end from a Cloudflare Agent against this API.
Every model and tool on this page works the same way: change the path and the body. GET /v1/price?model=… quotes a call for free first.