{"openapi":"3.1.0","info":{"title":"GlianaAI — prepaid balance API","version":"1","description":"The full GlianaAI catalog, called with an API key against a prepaid balance. Send `Authorization: Bearer gk_…` and the cost of each call is deducted from your balance — no payment handshake, no per-call signing. Top up in rupiah and manage keys at https://dashboard.glianalabs.com. Every response carries `x-gliana-charged-micro-usd` and `x-gliana-balance-micro-usd`, so you can track spend without a second request. Prices are identical to the pay-per-call rail.\n\n**Postman:** import `https://api.glianalabs.com/postman.json` (Import, then paste the link) for every endpoint below as a ready collection, then set its `gliana_key` variable to your key. Insomnia, Bruno and Hoppscotch import this spec directly: `https://api.glianalabs.com/openapi.dashboard.json`.","contact":{"name":"Gliana Labs","email":"contact@glianalabs.com","url":"https://ai.glianalabs.com"},"x-guidance":"Browse models at GET /v1/models, get a model’s exact inputs at GET /v1/schema?model=, quote at GET /v1/price?model=, then POST /v1/infer with { model, ...modelInput }. You get a 402 with the price; pay from your wallet and retry. No API key — payment is the gate. Rails: POST /v1/infer settles over MPP (USDC on Tempo); for native x402 USDC on Base or Solana, POST /x402/{model}; the same tools and recipes also settle in USDC on Algorand at /a402/… and on BNB Smart Chain at /b402/… (see the per-endpoint x-payment-info for each path’s exact protocol). File inputs (image/video/audio, e.g. video-to-video video_uri) take a public URL — upload a local file (free) at POST /v1/media (≤40MB) and pass the returned url."},"x-service-info":{"categories":["media","image-to-video","music","stt","text-to-image","text-to-video","tts","video-to-video","text","image-to-image"],"docs":{"homepage":"https://dashboard.glianalabs.com","apiReference":"https://dashboard.glianalabs.com/reference"}},"tags":[{"name":"media","description":"Generative media inference."},{"name":"image-to-video"},{"name":"music"},{"name":"stt"},{"name":"text-to-image"},{"name":"text-to-video"},{"name":"tts"},{"name":"video-to-video"},{"name":"text"},{"name":"image-to-image"},{"name":"image"},{"name":"recipe"},{"name":"utility"},{"name":"video"}],"servers":[{"url":"https://api.glianalabs.com"}],"externalDocs":{"description":"GlianaAI","url":"https://ai.glianalabs.com"},"paths":{"/v1/infer":{"post":{"operationId":"infer","summary":"Run any of 150+ generative models pay-per-call.","tags":["media","image-to-video","music","stt","text-to-image","text-to-video","tts","video-to-video","text","image-to-image"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nOne endpoint for the whole catalog: send { model, ...modelInput } — pick any model from GET /v1/models (120+ across image, video, image-to-video, text-to-speech, speech-to-text, music).","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id (see GET /v1/models)."},"prompt":{"type":"string","description":"Most models take a text prompt; STT/some take a file/url instead."}},"additionalProperties":true},"example":{"model":"grok-imagine-image","prompt":"a red apple on a table"}}}},"responses":{"200":{"description":"Model output + payment receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/infer\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"grok-imagine-image\",\"prompt\":\"a red apple on a table\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/infer', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"grok-imagine-image\",\n    \"prompt\": \"a red apple on a table\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/chat/completions":{"post":{"operationId":"chatCompletions","summary":"Generate chat completions with any LLM pay-per-call.","tags":["text"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nDrop-in for the OpenAI chat completions API: swap the base URL, keep your SDK. Pick any text model from GET /v1/models (category \"text\"). Billing is a pre-charged ceiling — (estimated input tokens + max_tokens) at the model’s per-1M rates — so set max_tokens to bound spend; the response returns real `usage`. Supports messages (required), max_tokens, temperature, top_p, stream: true (SSE, OpenAI chunk format), tools/tool_choice (OpenAI function calling — tool_calls + role:\"tool\" round-trip), and vision (content parts with image_url on vision-capable models). FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"parameters":[{"name":"x-gliana-max-discount","in":"header","required":false,"schema":{"type":"string","enum":["any","90","70","50"]},"description":"Route quality: the most a route may be priced under list, in percent (default: your account setting, else any). Stricter can cost more per call, never more than list. The response header x-gliana-route says which kind of route served the call (own, partner, partner-2, market:<seller>)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Text model id (see GET /v1/models, category \"text\")."},"messages":{"type":"array","description":"OpenAI-style chat messages: [{ role: \"user\"|\"assistant\"|\"system\"|\"tool\", content }].","items":{"type":"object","additionalProperties":true}},"max_tokens":{"type":"integer","description":"Output cap — bounds the pre-charged ceiling. Default 1024. A model that reasons by default is sent at least 1024 (2048 at reasoning_effort medium, 4096 at high or above), priced on what is sent; the x-gliana-max-tokens header says when it was raised."},"tools":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"OpenAI function tools; response returns tool_calls."}},"additionalProperties":true},"example":{"model":"grok-4.7","messages":[{"role":"user","content":"Summarize x402 in one sentence."}],"max_tokens":256}}}},"responses":{"200":{"description":"OpenAI chat-completion body (+ costMicroUsd and a payment receipt)."},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/chat/completions\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"grok-4.7\",\"messages\":[{\"role\":\"user\",\"content\":\"Summarize x402 in one sentence.\"}],\"max_tokens\":256}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/chat/completions', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"grok-4.7\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"Summarize x402 in one sentence.\"\n      }\n    ],\n    \"max_tokens\": 256\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/embeddings":{"post":{"operationId":"embeddings","summary":"Embed text for search and RAG with bge-m3 pay-per-call.","tags":["text"],"description":"**$0.000100–$0.006000 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nDrop-in for the OpenAI embeddings API: model \"bge-m3\" (1024 dimensions, multilingual), input a string or up to 2048 strings, encoding_format \"float\" or \"base64\". $0.02 per 1M tokens, $0.0001 minimum per call; the response returns `usage`. Token-id input is refused (send text).","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.000100","max":"0.006000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input"],"properties":{"model":{"type":"string","enum":["bge-m3"],"description":"The one embedding model served. May be left out."},"input":{"description":"A string or a list of up to 2048 strings (at most 8192 tokens each, 300k in all).","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"encoding_format":{"type":"string","enum":["float","base64"],"description":"base64 = little-endian float32, the OpenAI SDK default. float allows up to 512 inputs."}},"additionalProperties":true},"example":{"model":"bge-m3","input":["harga tiket kereta ke Bandung","train ticket price to Bandung"]}}}},"responses":{"200":{"description":"OpenAI embeddings body: { object: \"list\", data: [{ index, embedding }], model, usage } (+ costMicroUsd and a payment receipt)."},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/embeddings\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"bge-m3\",\"input\":[\"harga tiket kereta ke Bandung\",\"train ticket price to Bandung\"]}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/embeddings', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"bge-m3\",\n    \"input\": [\n      \"harga tiket kereta ke Bandung\",\n      \"train ticket price to Bandung\"\n    ]\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/images/generations":{"post":{"operationId":"imagesGenerate","summary":"Generate an image from a text prompt with any model.","tags":["image","text-to-image"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nCapability endpoint — pick any matching model with GET /v1/models and pass it as { model }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id (see GET /v1/models)."}},"additionalProperties":true},"example":{"model":"flux-2-pro-preview","prompt":"a red apple on a wooden table"}}}},"responses":{"200":{"description":"Result + payment receipt (media: { data: [{ url }] }; STT: { text }).","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/images/generations\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"flux-2-pro-preview\",\"prompt\":\"a red apple on a wooden table\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/images/generations', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"flux-2-pro-preview\",\n    \"prompt\": \"a red apple on a wooden table\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/images/edits":{"post":{"operationId":"imagesEdit","summary":"Edit or transform an image from a reference image.","tags":["image","image-to-image"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nCapability endpoint — pick any matching model with GET /v1/models and pass it as { model }. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id (see GET /v1/models)."}},"additionalProperties":true},"example":{"model":"fibo-edit-1.5","prompt":"make it watercolor","image_input":["https://example.com/input.png"]}}}},"responses":{"200":{"description":"Result + payment receipt (media: { data: [{ url }] }; STT: { text }).","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/images/edits\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"fibo-edit-1.5\",\"prompt\":\"make it watercolor\",\"image_input\":[\"https://example.com/input.png\"]}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/images/edits', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"fibo-edit-1.5\",\n    \"prompt\": \"make it watercolor\",\n    \"image_input\": [\n      \"https://example.com/input.png\"\n    ]\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/video/generations":{"post":{"operationId":"videoGenerate","summary":"Generate a video from a text prompt or an image.","tags":["video","text-to-video","image-to-video","video-to-video"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nCapability endpoint — pick any matching model with GET /v1/models and pass it as { model }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id (see GET /v1/models)."}},"additionalProperties":true},"example":{"model":"wan-2.7-i2v","prompt":"a timelapse of clouds over mountains"}}}},"responses":{"200":{"description":"Result + payment receipt (media: { data: [{ url }] }; STT: { text }).","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/video/generations\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"wan-2.7-i2v\",\"prompt\":\"a timelapse of clouds over mountains\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/video/generations', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"wan-2.7-i2v\",\n    \"prompt\": \"a timelapse of clouds over mountains\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/audio/speech":{"post":{"operationId":"audioSpeech","summary":"Convert text to speech with any TTS model.","tags":["tts"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nCapability endpoint — pick any matching model with GET /v1/models and pass it as { model }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id (see GET /v1/models)."}},"additionalProperties":true},"example":{"model":"grok-tts","input":"Hello from GlianaAI."}}}},"responses":{"200":{"description":"Result + payment receipt (media: { data: [{ url }] }; STT: { text }).","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/audio/speech\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"grok-tts\",\"input\":\"Hello from GlianaAI.\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/audio/speech', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"grok-tts\",\n    \"input\": \"Hello from GlianaAI.\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/audio/transcriptions":{"post":{"operationId":"audioTranscribe","summary":"Transcribe audio to text with any STT model.","tags":["stt"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nCapability endpoint — pick any matching model with GET /v1/models and pass it as { model }. FILE INPUT: if the audio file is already on the web or your own storage, pass `audio_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `audio_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id (see GET /v1/models)."}},"additionalProperties":true},"example":{"model":"grok-stt","audio_url":"https://example.com/input.mp3"}}}},"responses":{"200":{"description":"Result + payment receipt (media: { data: [{ url }] }; STT: { text }).","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/audio/transcriptions\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"grok-stt\",\"audio_url\":\"https://example.com/input.mp3\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/audio/transcriptions', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"grok-stt\",\n    \"audio_url\": \"https://example.com/input.mp3\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/music/generations":{"post":{"operationId":"musicGenerate","summary":"Generate music from a text prompt with any model.","tags":["music"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nCapability endpoint — pick any matching model with GET /v1/models and pass it as { model }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id (see GET /v1/models)."}},"additionalProperties":true},"example":{"model":"music-2.6","prompt":"a calm lo-fi beat"}}}},"responses":{"200":{"description":"Result + payment receipt (media: { data: [{ url }] }; STT: { text }).","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/music/generations\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"music-2.6\",\"prompt\":\"a calm lo-fi beat\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/music/generations', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"model\": \"music-2.6\",\n    \"prompt\": \"a calm lo-fi beat\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/rpc":{"post":{"operationId":"toolRpc","summary":"Send a JSON-RPC call to a supported chain.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nMulti-chain JSON-RPC proxy — { chain, method, params }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"chain":{"type":"string","description":"Chain to query, e.g. base, ethereum, solana."},"method":{"type":"string","description":"JSON-RPC method name, e.g. \"eth_blockNumber\"."},"params":{"type":"array","description":"JSON-RPC parameters, as an array."}},"required":["chain","method","params"]},"example":{"chain":"base","method":"eth_blockNumber","params":[]}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/rpc","costMicroUsd":2000,"chain":"base","result":"0x1a2b3c"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/rpc\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"chain\":\"base\",\"method\":\"eth_blockNumber\",\"params\":[]}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/rpc', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"chain\": \"base\",\n    \"method\": \"eth_blockNumber\",\n    \"params\": []\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/search":{"post":{"operationId":"toolSearch","summary":"Search the web and return ranked results.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWeb search — { q, count?: 1-20, country?: \"ID\", lang?: \"id\" }. Returns title, url and snippet per hit, plus which upstream answered. Providers are tried in order, so one being rate-limited falls through rather than failing the call.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"q":{"type":"string","description":"The search query."},"count":{"type":"number","description":"How many results to return."}},"required":["q","count"]},"example":{"q":"x402 payment protocol","count":5}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/search","costMicroUsd":5000,"query":"x402 payment protocol","provider":"brave","count":2,"results":[{"title":"x402 — an HTTP-native payment standard","url":"https://example.com/x402","snippet":"Uses HTTP 402 to attach a USDC payment to any request."},{"title":"Paying per API call with x402","url":"https://example.com/guide","snippet":"A client pays the challenge and retries the same request."}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/search\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"q\":\"x402 payment protocol\",\"count\":5}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/search', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"q\": \"x402 payment protocol\",\n    \"count\": 5\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/embed":{"post":{"operationId":"toolEmbed","summary":"Convert text into embedding vectors.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nText embeddings for search, clustering and RAG — { texts: [\"...\"] } or { text: \"...\" }. Up to 100 texts and 32,000 characters per call. Multilingual by default, so Indonesian and English embed into the same space and can be compared directly. Returns the model id and dimensions alongside the vectors.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"texts":{"type":"array","description":"Array of strings to embed, one vector per entry."}},"required":["texts"]},"example":{"texts":["harga tiket kereta ke Bandung","train ticket price to Bandung"]}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/embed","costMicroUsd":2000,"model":"@cf/baai/bge-m3","count":2,"dimensions":1024,"embeddings":[[0.0121,-0.0334,0.0087],[0.0118,-0.0301,0.0092]]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/embed\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"texts\":[\"harga tiket kereta ke Bandung\",\"train ticket price to Bandung\"]}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/embed', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"texts\": [\n      \"harga tiket kereta ke Bandung\",\n      \"train ticket price to Bandung\"\n    ]\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/rerank":{"post":{"operationId":"toolRerank","summary":"List documents ranked by relevance to a query.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nCross-encoder reranking for RAG — { query, documents, top_k? }. Reads the query with each document and orders them, most relevant first. Up to 100 documents (strings or { text } objects), each up to 4,000 characters. Returns results[] with index (position in your input), score and document. Use after a vector or keyword search, before prompting.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"query":{"type":"string","description":"What the documents are being ranked against, up to 1,000 characters."},"documents":{"type":"array","description":"Candidate texts to rank: up to 100 strings or { text } objects, each up to 4,000 characters."},"top_k":{"type":"integer","description":"Optional: return only the N most relevant documents. Default: all of them, ranked."}},"required":["query","documents"]},"example":{"query":"How do I get a refund?","documents":["Our office is open Monday to Friday.","Refunds are issued to the original payment method within 5 business days."]}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/rerank","costMicroUsd":2000,"model":"@cf/baai/bge-reranker-base","query":"How do I get a refund?","count":2,"results":[{"index":1,"score":0.981204,"document":"Refunds are issued to the original payment method within 5 business days."},{"index":0,"score":0.004117,"document":"Our office is open Monday to Friday."}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/rerank\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\":\"How do I get a refund?\",\"documents\":[\"Our office is open Monday to Friday.\",\"Refunds are issued to the original payment method within 5 business days.\"]}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/rerank', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"query\": \"How do I get a refund?\",\n    \"documents\": [\n      \"Our office is open Monday to Friday.\",\n      \"Refunds are issued to the original payment method within 5 business days.\"\n    ]\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/moderate":{"post":{"operationId":"toolModerate","summary":"Check text for unsafe content categories.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nSafety check for user-supplied text — { text }, up to 8,000 characters. Returns flagged plus the guard model hazard categories and its raw verdict. The verdict is that model judgement, not a legal determination: treat it as a signal in your own moderation flow.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"text":{"type":"string","description":"The text to classify for unsafe content."}},"required":["text"]},"example":{"text":"I will find where you live."}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/moderate","costMicroUsd":2000,"model":"@cf/meta/llama-guard-3-8b","flagged":true,"categories":["S1"],"verdict":"unsafe\nS1","chars":27}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/moderate\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\":\"I will find where you live.\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/moderate', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"text\": \"I will find where you live.\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/sentiment":{"post":{"operationId":"toolSentiment","summary":"Classify the sentiment of reviews or messages.","tags":["utility"],"description":"**$0.003000 per call**, deducted from your prepaid balance. Charged only on success.\n\nSentiment for one text or a batch — { text } or { texts: [...] }, up to 20 texts and 8,000 characters per call. Reads Indonesian (slang, typos, code-switching) and English. Returns results[] in input order with label (positive, negative, neutral, mixed), score -1 to 1, confidence, language and aspects (what was praised or criticised). Flat price per call.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"texts":{"type":"array","description":"Or up to 20 texts in one call, 8,000 characters in all."}},"required":["texts"]},"example":{"texts":["barangnya oke sih tp pengirimannya lama bgt","Support answered in 5 minutes, great service!"]}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/sentiment","costMicroUsd":3000,"model":"@cf/aisingapore/gemma-sea-lion-v4-27b-it","count":2,"results":[{"index":0,"label":"mixed","score":0.1,"confidence":0.86,"language":"id","aspects":[{"aspect":"barang","label":"positive"},{"aspect":"pengiriman","label":"negative"}]},{"index":1,"label":"positive","score":0.9,"confidence":0.95,"language":"en","aspects":[{"aspect":"support","label":"positive"}]}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/sentiment\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"texts\":[\"barangnya oke sih tp pengirimannya lama bgt\",\"Support answered in 5 minutes, great service!\"]}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/sentiment', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"texts\": [\n      \"barangnya oke sih tp pengirimannya lama bgt\",\n      \"Support answered in 5 minutes, great service!\"\n    ]\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/token-price":{"post":{"operationId":"toolTokenPrice","summary":"Fetch spot token prices by ticker symbol.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nSpot token prices — { symbols: \"BTC,ETH\", vs? } (CoinGecko ids also accepted via the same field or { ids }).","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"symbols":{"type":"string","description":"Comma-separated ticker symbols, e.g. \"BTC,ETH\"."},"vs":{"type":"string","description":"Quote currency for the price, e.g. \"usd\"."}},"required":["symbols","vs"]},"example":{"symbols":"BTC,ETH","vs":"usd"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/token-price","costMicroUsd":2000,"vs":"USD","prices":{"BTC":68000.12,"ETH":3450.5},"sources":{"BTC":"coinbase","ETH":"coinbase"}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/token-price\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"symbols\":\"BTC,ETH\",\"vs\":\"usd\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/token-price', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"symbols\": \"BTC,ETH\",\n    \"vs\": \"usd\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/market-brief":{"post":{"operationId":"toolMarketBrief","summary":"Get prices, gas and DeFi TVL in one call.","tags":["utility"],"description":"**$0.030000 per call**, deducted from your prepaid balance. Charged only on success.\n\nComposed market snapshot — { chain?: \"base\", symbols?: \"BTC,ETH,SOL\", protocol?: \"aave\" }. One request instead of four: spot prices, gas on the chain you are about to transact on (including the USD cost of a transfer), total DeFi TVL with the largest chains, and a specific protocol TVL when asked. Each section degrades independently — a dead upstream nulls its own field and is named in `degraded` rather than failing the brief.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.030000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"chain":{"type":"string","description":"Chain whose gas and DEX activity to include."},"symbols":{"type":"string","description":"Comma-separated ticker symbols, e.g. \"BTC,ETH\"."}},"required":["chain","symbols"]},"example":{"chain":"base","symbols":"BTC,ETH,SOL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/market-brief","costMicroUsd":30000,"as_of":"2026-08-07T09:00:00.000Z","prices":{"BTC":68000.12,"ETH":1911.22,"SOL":142.8},"gas":{"chain":"base","gas_price_gwei":0.006,"native_symbol":"ETH","transfer_cost_usd":0.000241},"defi":{"total_defi_tvl_usd":78000000000,"top_chains":[{"chain":"Ethereum","tvl_usd":41490652984}]}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/market-brief\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"chain\":\"base\",\"symbols\":\"BTC,ETH,SOL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/market-brief', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"chain\": \"base\",\n    \"symbols\": \"BTC,ETH,SOL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/dex-pairs":{"post":{"operationId":"toolDexPairs","summary":"List DEX pools for a token by liquidity.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nOn-chain DEX liquidity for a token — { query: \"WIF\" | \"<contract address>\", chain?, limit?: 1-20 }. Returns the pools sorted by liquidity descending with price, liquidity, 24h volume, 24h change and the pair address. Ticker searches can match impostor tokens, so pass the contract address when you have it and treat a thin pool as untradeable.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"query":{"type":"string","description":"Token symbol, name or contract address to look up."}},"required":["query"]},"example":{"query":"WIF"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/dex-pairs","costMicroUsd":10000,"query":"WIF","matched":30,"pairs":[{"chain":"solana","dex":"raydium","pair":"WIF/SOL","price_usd":0.1408,"liquidity_usd":3985632.33,"volume_24h_usd":77383.67,"price_change_24h_pct":-3.61}],"source":"dexscreener"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/dex-pairs\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\":\"WIF\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/dex-pairs', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"query\": \"WIF\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/defi-tvl":{"post":{"operationId":"toolDefiTvl","summary":"Get DeFi value locked by protocol or chain.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nTotal value locked from DefiLlama — { protocol?: \"aave\", chain?: \"Ethereum\", limit? }. With a protocol: TVL, 1d/7d change, market cap and the per-chain split. With a chain: its TVL and rank. With neither: the largest chains plus the total. Borrowed and staking rows are excluded so the figure is not double-counted.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"protocol":{"type":"string","description":"DefiLlama protocol slug, e.g. \"aave\"."}},"required":["protocol"]},"example":{"protocol":"aave"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/defi-tvl","costMicroUsd":10000,"protocol":"Aave","symbol":"AAVE","tvl_usd":14741707588,"change_1d_pct":-0.5,"change_7d_pct":2.1,"chains":[{"chain":"Ethereum","tvl_usd":12245430563}],"source":"defillama"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/defi-tvl\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"protocol\":\"aave\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/defi-tvl', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"protocol\": \"aave\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/gas-price":{"post":{"operationId":"toolGasPrice","summary":"Read EVM gas price in gwei and dollars.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nCurrent gas on an EVM chain — { chain: \"base\", gasLimit? }. Supports ethereum, base, arbitrum, optimism, bsc and polygon. Returns gas price in gwei, the priority fee where reported, and the estimated cost of a transaction in both the native token and USD. The base fee moves every block, so this is a quote.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"chain":{"type":"string","description":"Chain to query, e.g. base, ethereum, solana."}},"required":["chain"]},"example":{"chain":"base"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/gas-price","costMicroUsd":10000,"chain":"base","gas_price_gwei":0.006,"native_symbol":"ETH","gas_limit":21000,"estimated_cost_native":1.26e-7,"estimated_cost_usd":0.000241}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/gas-price\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"chain\":\"base\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/gas-price', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"chain\": \"base\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/perp-markets":{"post":{"operationId":"toolPerpMarkets","summary":"List Hyperliquid perps with funding and OI.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nHyperliquid perpetual futures in one call — { coins?: \"BTC,ETH,SOL\", sort?: \"volume\" | \"open_interest\" | \"funding\" | \"change\", limit?: 1-50 }. Returns mark and oracle price, 24h change, hourly funding with its annualised rate, open interest in coins and USD, 24h volume and max leverage per market, plus not_found for requested symbols with no market. Funding is paid hourly; the annual rate is the current hour annualised, not a forecast.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"coins":{"type":"string","description":"Comma-separated Hyperliquid symbols, e.g. \"BTC,ETH,SOL\" (up to 20). Omit for the whole market, sorted."},"sort":{"type":"string","description":"volume (default), open_interest, funding (largest absolute funding first) or change (largest absolute 24h move first)."},"limit":{"type":"number","description":"How many markets to return, 1-50. Default 10."}}},"example":{"coins":"BTC,ETH,SOL","sort":"volume"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/perp-markets","costMicroUsd":2000,"venue":"hyperliquid","sort":"volume","count":2,"total_markets":229,"not_found":[],"funding_interval":"1h","markets":[{"coin":"BTC","mark_price":78138,"oracle_price":78172,"change_24h_pct":1.73,"funding_rate_hourly":0.0000125,"funding_apr_pct":10.95,"open_interest":35698.74,"open_interest_usd":2789426031,"volume_24h_usd":2851954388,"premium":-0.000422,"max_leverage":40},{"coin":"ETH","mark_price":1912.4,"oracle_price":1913.1,"change_24h_pct":-0.42,"funding_rate_hourly":0.00001,"funding_apr_pct":8.76,"open_interest":412000.5,"open_interest_usd":787908956,"volume_24h_usd":1204433120,"premium":-0.00031,"max_leverage":25}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/perp-markets\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"coins\":\"BTC,ETH,SOL\",\"sort\":\"volume\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/perp-markets', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"coins\": \"BTC,ETH,SOL\",\n    \"sort\": \"volume\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/swap-quote":{"post":{"operationId":"toolSwapQuote","summary":"Get token swap and bridge quotes across chains.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nBest routes to swap or bridge tokens across 60+ mainnets — { chain, from, to, amount, to_chain?, slippage_pct?, limit? }. amount is in whole tokens. Returns routes[] with receive, receive_min, value lost to fees and price impact, gas, fees and the DEXs or bridges used. Quote only: no wallet needed, nothing executed. The per-call price buys the quote; a service fee (service_fee_pct) is taken on-chain only if a swap executes.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"chain":{"type":"string","description":"Chain to swap on: a name like base, ethereum, arbitrum, bsc, solana, or a chain id."},"from":{"type":"string","description":"Token to sell: a symbol like USDC or ETH, or its contract address."},"to":{"type":"string","description":"Token to buy: a symbol or contract address."},"amount":{"type":"string","description":"How much of the from token to sell, in whole tokens, e.g. \"10\" or \"0.25\"."},"to_chain":{"type":"string","description":"Optional destination chain for a bridge, e.g. arbitrum or solana. Default: same as chain."},"slippage_pct":{"type":"number","description":"Optional slippage tolerance in percent, 0.05 to 10. Default 0.5."},"limit":{"type":"integer","description":"Optional number of routes to return, 1 to 5. Default 3."}},"required":["chain","from","to","amount"]},"example":{"chain":"base","from":"USDC","to":"ETH","amount":"10"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/swap-quote","costMicroUsd":2000,"from":{"chain":"Base","chain_id":8453,"symbol":"USDC","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","decimals":6,"amount":"10"},"to":{"chain":"Base","chain_id":8453,"symbol":"ETH","address":"0x0000000000000000000000000000000000000000","decimals":18},"slippage_pct":0.5,"service_fee_pct":0,"routes":[{"receive":"0.004157370122155659","receive_min":"0.004136583271544881","send_usd":9.8864,"receive_usd":9.9926,"value_lost_pct":-1.07,"gas_usd":0.0077,"fees":[{"name":"Routing fee","usd":0.0247}],"via":["1inch"],"duration_s":0,"tags":["RECOMMENDED","CHEAPEST","FASTEST"]}],"note":"GlianaAI never holds your funds or keys. A quote, not a transaction."}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/swap-quote\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"chain\":\"base\",\"from\":\"USDC\",\"to\":\"ETH\",\"amount\":\"10\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/swap-quote', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"chain\": \"base\",\n    \"from\": \"USDC\",\n    \"to\": \"ETH\",\n    \"amount\": \"10\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/swap-build":{"post":{"operationId":"toolSwapBuild","summary":"Get an unsigned token swap transaction to sign.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nAn unsigned swap or bridge transaction for your own wallet to sign — { chain, from, to, amount, address, to_chain?, to_address?, slippage_pct?, max_value_lost_pct? }. Non-custodial: no keys or funds pass through GlianaAI. Returns the EVM transaction or a base64 Solana transaction, an ERC-20 approval when needed, receive_min and fees. Refused for free above max_value_lost_pct (default 3). The per-call price buys the transaction; a service fee (service_fee_pct) is taken on-chain only when it is signed and sent.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"chain":{"type":"string","description":"Chain to swap on: a name like base, ethereum, arbitrum, bsc, solana, or a chain id."},"from":{"type":"string","description":"Token to sell: a symbol like USDC or ETH, or its contract address."},"to":{"type":"string","description":"Token to buy: a symbol or contract address."},"amount":{"type":"string","description":"How much of the from token to sell, in whole tokens, e.g. \"10\" or \"0.25\"."},"address":{"type":"string","description":"The wallet that will sign and send the transaction (0x… on EVM, base58 on Solana)."},"to_chain":{"type":"string","description":"Optional destination chain for a bridge. Default: same as chain."},"to_address":{"type":"string","description":"Optional recipient on the destination chain. Default: address. Required when bridging between EVM and Solana."},"slippage_pct":{"type":"number","description":"Optional slippage tolerance in percent, 0.05 to 10. Default 0.5."},"max_value_lost_pct":{"type":"number","description":"Optional ceiling on value lost to fees and price impact, in percent. Default 3; above it the call is refused for free."}},"required":["chain","from","to","amount","address"]},"example":{"chain":"base","from":"USDC","to":"ETH","amount":"10","address":"0x7662E00f8Ab4C362166e1FF649Ff6c2A638c80AD"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/swap-build","costMicroUsd":5000,"from":{"chain":"Base","chain_id":8453,"symbol":"USDC","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","decimals":6,"amount":"10"},"to":{"chain":"Base","chain_id":8453,"symbol":"ETH","address":"0x0000000000000000000000000000000000000000","decimals":18,"recipient":"0x7662E00f8Ab4C362166e1FF649Ff6c2A638c80AD"},"signer":"0x7662E00f8Ab4C362166e1FF649Ff6c2A638c80AD","receive":"0.004154583222681","receive_min":"0.004133810306567595","value_lost_pct":-1.01,"service_fee_pct":0,"approval":{"required_if_allowance_below":"10000000","spender":"0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE","transaction":{"to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","data":"0x095ea7b3…","value":"0x0","chainId":8453}},"transaction":{"chainId":8453,"to":"0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE","data":"0x…","value":"0x0","gasLimit":"0x…"},"note":"Unsigned: nothing happens until your wallet signs and sends it."}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/swap-build\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"chain\":\"base\",\"from\":\"USDC\",\"to\":\"ETH\",\"amount\":\"10\",\"address\":\"0x7662E00f8Ab4C362166e1FF649Ff6c2A638c80AD\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/swap-build', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"chain\": \"base\",\n    \"from\": \"USDC\",\n    \"to\": \"ETH\",\n    \"amount\": \"10\",\n    \"address\": \"0x7662E00f8Ab4C362166e1FF649Ff6c2A638c80AD\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/exchange-rate":{"post":{"operationId":"toolExchangeRate","summary":"Convert fiat currencies at mid-market rates.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nMid-market fiat exchange rates — { from?: \"USD\", to?: \"IDR,EUR\", amount? }. Omit `to` for every currency. Non-USD pairs are cross-rated via USD; reference rates, not dealable quotes.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"from":{"type":"string","description":"Currency code to convert FROM, e.g. \"USD\"."},"to":{"type":"string","description":"Currency code(s) to convert TO — comma-separated for several, e.g. \"IDR,EUR\"."},"amount":{"type":"number","description":"Amount in the `from` currency to convert."}},"required":["from","to","amount"]},"example":{"from":"USD","to":"IDR,EUR","amount":100}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/exchange-rate","costMicroUsd":2000,"base":"USD","rates":{"IDR":18076.9467,"EUR":0.875576},"amount":100,"converted":{"IDR":1807694.6663,"EUR":87.5576},"as_of":"30 Jul 2026","source":"open.er-api.com","note":"Mid-market reference rates, not dealable quotes."}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/exchange-rate\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"from\":\"USD\",\"to\":\"IDR,EUR\",\"amount\":100}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/exchange-rate', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"from\": \"USD\",\n    \"to\": \"IDR,EUR\",\n    \"amount\": 100\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/domain-lookup":{"post":{"operationId":"toolDomainLookup","summary":"Look up domain registration, age and DNS.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRegistration and DNS for a domain in one call — { domain: \"example.com\" | \"<url>\", records?: [\"A\",\"AAAA\",\"MX\",\"NS\",\"TXT\",\"CNAME\",\"CAA\"] }. Registrar, creation and expiry dates, age in days, status, nameservers and DNSSEC come from the registry own RDAP server; DNS answers by type; plus SPF, DMARC and the DMARC policy. registered is false when the registry has no such domain. TLDs that publish no RDAP (e.g. .io, .co) return registration null, named in degraded, with DNS still answered.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"domain":{"type":"string","description":"Domain to look up, e.g. \"example.com\". A full URL is accepted and reduced to its hostname."},"records":{"type":"array","description":"DNS record types to resolve: any of A, AAAA, MX, NS, TXT, CNAME, CAA. Default A, AAAA, MX, NS, TXT."}},"required":["domain"]},"example":{"domain":"glianalabs.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/domain-lookup","costMicroUsd":2000,"domain":"glianalabs.com","registered":true,"registration":{"registrar":"Cloudflare, Inc.","created":"2025-09-23T00:00:00Z","expires":"2027-09-23T00:00:00Z","updated":"2026-08-24T00:00:00Z","age_days":357,"status":["client transfer prohibited"],"nameservers":["elliott.ns.cloudflare.com","hera.ns.cloudflare.com"],"dnssec":false},"dns":{"A":["104.21.86.84","172.67.217.44"],"MX":[{"priority":15,"host":"route3.mx.cloudflare.net"}],"TXT":["v=spf1 include:_spf.mx.cloudflare.net ~all"]},"email":{"spf":"v=spf1 include:_spf.mx.cloudflare.net ~all","dmarc":null,"dmarc_policy":null,"mx_count":3},"degraded":[],"sources":{"registration":"https://rdap.verisign.com/com/v1/","dns":"cloudflare-dns.com"}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/domain-lookup\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"domain\":\"glianalabs.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/domain-lookup', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"domain\": \"glianalabs.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/phone-verify":{"post":{"operationId":"toolPhoneVerify","summary":"Validate a phone number and identify its line type.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nCheck a telephone number without calling or texting it — { phone: \"+6281390000719\" | \"<national>\", country?: \"ID\" }. Returns valid, possible, e164, national and international formats, country, country_calling_code, type (MOBILE, FIXED_LINE, VOIP, TOLL_FREE and so on) and is_mobile; Indonesian numbers also return carrier_allocated, the operator the range was issued to. Does NOT confirm a SIM exists or is reachable — that needs an HLR query — so live_checked is always false.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"phone":{"type":"string","description":"The phone for this call."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, e.g. ID. Required only when phone is in national format rather than E.164."}},"required":["phone"]},"example":{"phone":"+6281390000719"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/phone-verify","costMicroUsd":2000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/phone-verify\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"phone\":\"+6281390000719\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/phone-verify', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"phone\": \"+6281390000719\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/email-verify":{"post":{"operationId":"toolEmailVerify","summary":"Check an email domain can receive mail.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nScreen an email address without sending to it — { email: \"name@example.com\" }. Returns syntax_valid, mx (hosts, and null_mx for RFC 7505 \"accepts no mail\"), accepts_mail, disposable (matched by domain AND by MX host, so vanity domains pointed at throwaway providers are caught), role_account, free_provider, did_you_mean for a near-miss domain, auth (spf, dmarc, dmarc_policy), and verdict: deliverable_domain, risky, undeliverable or unknown. verdict describes the DOMAIN; the mailbox is never probed, so mailbox_checked is always false.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"email":{"type":"string","description":"The email for this call."}},"required":["email"]},"example":{"email":"hello@glianalabs.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/email-verify","costMicroUsd":2000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/email-verify\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\":\"hello@glianalabs.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/email-verify', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"email\": \"hello@glianalabs.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/repo-scan":{"post":{"operationId":"toolRepoScan","summary":"Scan a public repository for leaked credentials.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nSecret scan across a whole public GitHub repository — { repo: \"owner/name\" | \"<github url>\", ref?: \"main\" }. Fetches one tarball (no token, no API rate limit) and scans it in memory against the same table as tools/secret-scan, including BIP-39 recovery phrases. Returns files_scanned, found, high_severity and findings[] with path, line, kind and the match REDACTED to first and last four characters — it reports where a credential is, never what it is. Binaries and vendored directories are skipped; a repo over 25 MB compressed is refused free. Matches are shapes, not proof.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"repo":{"type":"string","description":"The repo for this call."}},"required":["repo"]},"example":{"repo":"sindresorhus/slugify"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/repo-scan","costMicroUsd":20000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/repo-scan\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"repo\":\"sindresorhus/slugify\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/repo-scan', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"repo\": \"sindresorhus/slugify\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/calldata-decode":{"post":{"operationId":"toolCalldataDecode","summary":"Check what a transaction calls before signing it.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nDecode transaction input data — { calldata: \"0x…\" }. Returns the 4-byte selector, the most likely signature, arguments decoded by type (address, uintN, intN, bool, bytesN; dynamic types reported as offsets rather than guessed), and any colliding signatures. Candidates are ordered oldest-submission-first because 4byte.directory takes submissions from anyone and popular selectors are deliberately collided with — the plain ERC-20 transfer selector returns a spam name first by default. A hint, never proof: 4byte maps selectors to names and does not know which contract you are calling.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"calldata":{"type":"string","description":"The calldata for this call."}},"required":["calldata"]},"example":{"calldata":"0xa9059cbb000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000f4240"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/calldata-decode","costMicroUsd":2000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/calldata-decode\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"calldata\":\"0xa9059cbb000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000f4240\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/calldata-decode', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"calldata\": \"0xa9059cbb000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000f4240\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/contract-scan":{"post":{"operationId":"toolContractScan","summary":"See what a contract can do to its users.","tags":["utility"],"description":"**$0.004000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRead a deployed contract bytecode — { address: \"0x…\", chain?: \"ethereum\" | base | bsc | polygon | arbitrum | optimism }. Returns is_contract, bytecode_bytes, detected standards (ERC-20/721/1155), proxy and the implementation it forwards to, and owner_powers naming each privileged capability found: mint, pause, blacklist, fee changes, upgradeability, SELFDESTRUCT, DELEGATECALL, CREATE2. No explorer and no third-party risk feed, so it works on an unverified contract deployed minutes ago and cannot be fooled by published source that differs from what runs. Capabilities are not accusations.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"address":{"type":"string","description":"The free-text address to parse."},"chain":{"type":"string","description":"Chain to query, e.g. base, ethereum, solana."}},"required":["address","chain"]},"example":{"address":"0xdAC17F958D2ee523a2206206994597C13D831ec7","chain":"ethereum"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/contract-scan","costMicroUsd":4000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/contract-scan\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"address\":\"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\"chain\":\"ethereum\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/contract-scan', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n    \"chain\": \"ethereum\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/name-available":{"post":{"operationId":"toolNameAvailable","summary":"Check a project name across registries and domains.","tags":["utility"],"description":"**$0.004000 per call**, deducted from your prepaid balance. Charged only on success.\n\nIs this name still free — { name: \"myproject\", domains?: true }. Checks GitHub, npm, PyPI, crates.io, RubyGems and Docker Hub via their documented availability endpoints, plus .com .io .dev .app .net against registry RDAP (not DNS — an unresolved domain is still taken). Returns available true/false/null per registry with the page URL, the domain list and a summary. Registries and domains only: it does not probe social platforms. null means no answer, never \"free\".","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","description":"Display name shown on the card."}},"required":["name"]},"example":{"name":"glianalabs"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/name-available","costMicroUsd":4000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/name-available\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"glianalabs\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/name-available', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"name\": \"glianalabs\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/brand-monitor":{"post":{"operationId":"toolBrandMonitor","summary":"Find registered lookalikes of your domain.","tags":["utility"],"description":"**$0.015000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWho is registering lookalikes of a brand — { domain: \"example.com\", limit?: 1-60 }. Generates typo, homoglyph, hyphenation and alternate-TLD variants, resolves each, then reads RDAP registration for the first few that resolve. Returns your own registration, lookalikes with the trick used and their A records, recently_registered for anything under 90 days old, and a summary. Age is the signal: a lookalike registered last week is a live campaign, an old one is usually a defensive registration, and DNS alone cannot tell them apart.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.015000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"domain":{"type":"string","description":"Domain to look up, e.g. \"example.com\". A full URL is accepted and reduced to its hostname."}},"required":["domain"]},"example":{"domain":"glianalabs.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/brand-monitor","costMicroUsd":15000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/brand-monitor\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"domain\":\"glianalabs.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/brand-monitor', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"domain\": \"glianalabs.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/site-deploy":{"post":{"operationId":"toolSiteDeploy","summary":"Publish a static website and get its URL.","tags":["utility"],"description":"**$0.050000 per call**, deducted from your prepaid balance. Charged only on success.\n\nHost static files on a public HTTPS address — { files: { \"index.html\": \"<base64>\", … } }, index.html required, up to 2,000 files and 17 MB; name? picks the address (a random suffix is added). Returns { url, site, key, expiresAt }; the site lives 30 days, and { site, key, files } redeploys it and adds 30 days. No server code, no forms. POST /v1/sites/delete { site, key } takes it down for free.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.050000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"files":{"type":"object","description":"The files for this call."}},"required":["files"]},"example":{"files":{"index.html":"PGgxPkhlbGxvIGZyb20gYW4gYWdlbnQ8L2gxPg=="}}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/site-deploy","costMicroUsd":50000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/site-deploy\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"files\":{\"index.html\":\"PGgxPkhlbGxvIGZyb20gYW4gYWdlbnQ8L2gxPg==\"}}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/site-deploy', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"files\": {\n      \"index.html\": \"PGgxPkhlbGxvIGZyb20gYW4gYWdlbnQ8L2gxPg==\"\n    }\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/secret-scan":{"post":{"operationId":"toolSecretScan","summary":"Find credentials left in a block of text.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nScan text for leaked credentials — { text: \"<content>\" }, up to 200,000 characters. Returns findings[] with kind - over fifty credential formats across cloud, source control, package registries, AI providers, payments and messaging, plus BIP-39 recovery phrases matched against the real wordlist - severity, line number and the match REDACTED to first and last four characters; the full value is never returned. Also flags high-entropy values assigned to secret-looking names. Matches are shapes, not proof — a key in a test fixture looks exactly like a live one.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"text":{"type":"string","description":"The text to process."}},"required":["text"]},"example":{"text":"const client = new Client({ apiKey: \"sk-ant-api03-EXAMPLEEXAMPLEEXAMPLEEXAMPLE\" });"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/secret-scan","costMicroUsd":2000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/secret-scan\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\":\"const client = new Client({ apiKey: \\\"sk-ant-api03-EXAMPLEEXAMPLEEXAMPLEEXAMPLE\\\" });\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/secret-scan', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"text\": \"const client = new Client({ apiKey: \\\"sk-ant-api03-EXAMPLEEXAMPLEEXAMPLEEXAMPLE\\\" });\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/typosquat":{"post":{"operationId":"toolTyposquat","summary":"Find registered lookalikes of a domain.","tags":["utility"],"description":"**$0.004000 per call**, deducted from your prepaid balance. Charged only on success.\n\nLookalike domains that actually resolve — { domain: \"example.com\", limit?: 1-60 }. Generates omissions, transpositions, repetitions, homoglyphs, adjacent-key typos, bitsquats, affixes (login-, -secure, -wallet) hyphenation and alternate TLDs, spread across those types so a small limit still buys breadth, then resolves each. Returns variants[] with the trick used and the A records, plus counts checked and registered. A variant that resolves is registered and pointing somewhere — not proof of bad intent, since a brand owner defensive registration looks identical from DNS.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"domain":{"type":"string","description":"Domain to look up, e.g. \"example.com\". A full URL is accepted and reduced to its hostname."}},"required":["domain"]},"example":{"domain":"glianalabs.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/typosquat","costMicroUsd":4000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/typosquat\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"domain\":\"glianalabs.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/typosquat', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"domain\": \"glianalabs.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/security-headers":{"post":{"operationId":"toolSecurityHeaders","summary":"Grade the security headers of a URL.","tags":["utility"],"description":"**$0.003000 per call**, deducted from your prepaid balance. Charged only on success.\n\nScore a URL response headers — { url: \"https://example.com\" }. Grades content-security-policy, strict-transport-security, x-content-type-options, x-frame-options, referrer-policy and permissions-policy; returns score 0-100, grade A-F, present[] with live values and missing[] with what each absent header would buy. Plain http loses points because HSTS cannot help there. Grades one URL, and a good grade means the defences are on, not that the application is sound.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"https URL of the page to fetch."}},"required":["url"]},"example":{"url":"https://ai.glianalabs.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/security-headers","costMicroUsd":3000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/security-headers\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://ai.glianalabs.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/security-headers', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"url\": \"https://ai.glianalabs.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/email-headers":{"post":{"operationId":"toolEmailHeaders","summary":"Detect sender spoofing from raw email headers.","tags":["utility"],"description":"**$0.003000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRead raw message headers — { headers: \"<raw block>\" }, up to 100,000 characters. Returns From, Return-Path, Reply-To and their domains, the DKIM signing domain, SPF/DKIM/DMARC verdicts, Received hop count and findings[]. The important part is ALIGNMENT rather than pass/fail: SPF can pass for an envelope domain the reader never sees while the visible From is someone else, which is the mechanic behind most display-name spoofing. Authentication-Results is written by the receiving server, so a forged block can claim anything.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"headers":{"type":"string","description":"The headers for this call."}},"required":["headers"]},"example":{"headers":"From: Billing <billing@example.com>\nReturn-Path: <bounce@mailer.example.net>\nAuthentication-Results: mx.example.org; spf=pass; dkim=pass; dmarc=fail"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/email-headers","costMicroUsd":3000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/email-headers\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"headers\":\"From: Billing <billing@example.com>\\nReturn-Path: <bounce@mailer.example.net>\\nAuthentication-Results: mx.example.org; spf=pass; dkim=pass; dmarc=fail\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/email-headers', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"headers\": \"From: Billing <billing@example.com>\\nReturn-Path: <bounce@mailer.example.net>\\nAuthentication-Results: mx.example.org; spf=pass; dkim=pass; dmarc=fail\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/web-archive":{"post":{"operationId":"toolWebArchive","summary":"Find when a site first appeared, from the archive.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nInternet Archive history for a site — { url: \"example.com\" | \"<url>\", limit?: 1-50 }. Returns first_seen, last_seen, years_archived, snapshot_count and snapshots[] with timestamp, status and a direct archive_url. archived: false when nothing was ever captured, which is itself a signal. Dates a domain independently of its RDAP registration.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"https URL of the page to fetch."}},"required":["url"]},"example":{"url":"glianalabs.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/web-archive","costMicroUsd":2000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/web-archive\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"glianalabs.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/web-archive', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"url\": \"glianalabs.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/ip-lookup":{"post":{"operationId":"toolIpLookup","summary":"Find the network owner of an IP address.","tags":["utility"],"description":"**$0.002000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWho owns an IP on the network — { ip: \"1.1.1.1\" }. Returns asn, the BGP prefix it is announced in, country, the regional registry that allocated it and the allocation date, from Team Cymru public IP-to-ASN DNS service. Network ownership only: no city geolocation (unreliable) and nothing identifying a person.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ip":{"type":"string","description":"The ip for this call."}},"required":["ip"]},"example":{"ip":"1.1.1.1"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/ip-lookup","costMicroUsd":2000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/ip-lookup\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ip\":\"1.1.1.1\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/ip-lookup', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ip\": \"1.1.1.1\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/osint-brief":{"post":{"operationId":"toolOsintBrief","summary":"Profile a contact or org from open sources.","tags":["utility"],"description":"**$0.012000 per call**, deducted from your prepaid balance. Charged only on success.\n\nOpen-source profile of a contact or organisation in one call — { email?, phone?, domain?, ip?, country? }, at least one required; domain defaults to the email domain. Returns the email-verify and phone-verify blocks, domain registration from the registry own RDAP server (registrar, created, age_days, nameservers) with DNS and SPF/DMARC, network ownership for an ip (ASN, BGP prefix, country, registry) from Team Cymru, and risk { score 0-100, level low|medium|high, reasons[] } where each reason names the signal and the points it contributed, plus findings[] for every check that came back clean and a one-line summary. It scores and describes; it never recommends — allow or block is yours to decide. Infrastructure and deliverability signals only — never a name, an address or any personal detail, and neither mailbox nor subscriber existence is confirmed. Sections degrade independently and are named in degraded.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.012000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"email":{"type":"string","description":"Email address to profile. At least one of email, phone, domain or ip is required."},"domain":{"type":"string","description":"Domain or URL to profile. Defaults to the email domain when an email is given."},"phone":{"type":"string","description":"Telephone number, E.164 or national with country."},"ip":{"type":"string","description":"IPv4 address to resolve to its network owner (ASN, BGP prefix, country)."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code for a national-format phone, e.g. ID."}},"required":["email","domain"]},"example":{"email":"hello@glianalabs.com","domain":"glianalabs.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/osint-brief","costMicroUsd":12000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/osint-brief\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\":\"hello@glianalabs.com\",\"domain\":\"glianalabs.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/osint-brief', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"email\": \"hello@glianalabs.com\",\n    \"domain\": \"glianalabs.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/address-id":{"post":{"operationId":"toolAddressId","summary":"Parse an Indonesian address into components.","tags":["utility"],"description":"**$0.003000 per call**, deducted from your prepaid balance. Charged only on success.\n\nParse a messy Indonesian address into components — { address }. kabupaten_kota and provinsi are resolved from official Kepmendagri data rather than from a model, so they cannot be invented, and `verified` reports where the model disagreed. Returns jalan, nomor, rt, rw, kelurahan, kecamatan, kabupaten_kota, provinsi, kode_pos, the official kode with coordinates, and a confidence. kecamatan/kelurahan/kode_pos are as written and unverified.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"address":{"type":"string","description":"The free-text address to parse."}},"required":["address"]},"example":{"address":"Jl. Medan Merdeka Barat No. 12 RT 03/RW 05, Gambir, Gambir, Jakarta Pusat 10110"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/address-id","costMicroUsd":3000,"input":"Jl. Medan Merdeka Barat No. 12 RT 03/RW 05, Gambir, Gambir, Jakarta Pusat 10110","parsed":{"jalan":"Medan Merdeka Barat","nomor":"12","rt":"3","rw":"5","kelurahan":"Gambir","kecamatan":"Gambir","kabupaten_kota":"Kota Administrasi Jakarta Pusat","provinsi":"Daerah Khusus Ibukota Jakarta","kode_pos":"10110"},"wilayah":{"kode":"31.71","kabupaten_kota":"Kota Administrasi Jakarta Pusat","provinsi":"Daerah Khusus Ibukota Jakarta","lat":-6.17291,"lng":106.8187},"verified":{"kabupaten_kota":true,"provinsi":true},"confidence":"high","notes":[]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/address-id\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"address\":\"Jl. Medan Merdeka Barat No. 12 RT 03/RW 05, Gambir, Gambir, Jakarta Pusat 10110\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/address-id', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"address\": \"Jl. Medan Merdeka Barat No. 12 RT 03/RW 05, Gambir, Gambir, Jakarta Pusat 10110\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/product-listing":{"post":{"operationId":"toolProductListing","summary":"Generate marketplace listing copy from a photo.","tags":["utility"],"description":"**$0.008000 per call**, deducted from your prepaid balance. Charged only on success.\n\nTurn a product photo into ready-to-post marketplace copy — { image_url | image_base64 }. Returns title and description in BOTH Indonesian and English, plus category, condition, material, colours and search tags. Written from what is visible only: brands, sizes, materials and warranties are never inferred, and anything the photo does not show is null. Nothing is stored. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.008000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"image_url":{"type":"string","description":"https URL of the product photo."}},"required":["image_url"]},"example":{"image_url":"https://example.com/product.jpg"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/product-listing","costMicroUsd":8000,"listing":{"title_id":"Tas Selempang Kulit Coklat Pria","title_en":"Men's Brown Leather Crossbody Bag","description_id":"Tas selempang berbahan kulit warna coklat. Terdapat tali bahu yang bisa diatur dan satu kompartemen utama dengan ritsleting.","description_en":"Brown leather crossbody bag with an adjustable shoulder strap and a single zipped main compartment.","category":"Bags & Luggage","condition":"new","material":"Leather","colors":["coklat","brown"],"tags":["tas selempang","tas kulit","crossbody bag","leather bag","tas pria"]},"model":"gemini-2.5-flash"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/product-listing\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image_url\":\"https://example.com/product.jpg\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/product-listing', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"image_url\": \"https://example.com/product.jpg\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/moderate-image":{"post":{"operationId":"toolModerateImage","summary":"Check an image for NSFW and harmful content.","tags":["utility"],"description":"**$0.003000 per call**, deducted from your prepaid balance. Charged only on success.\n\nNSFW and harm scores for one image — { image_url | image_base64, threshold? }. Returns nsfw, label (safe | suggestive | explicit | blocked), flagged and a 0-1 score per category: sexual_explicit, sexual_suggestive, minor_sexualized, violence_graphic, self_harm, hate_symbols, weapons, drugs. JPEG, PNG or WebP up to 6 MB; nothing is stored. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"threshold":{"type":"number","description":"Optional score from which a category counts as flagged, above 0 and at most 1. Default 0.5."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}},"example":{"image_url":"https://example.com/upload.jpg"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/moderate-image","costMicroUsd":3000,"nsfw":true,"label":"suggestive","flagged":["sexual_suggestive"],"scores":{"sexual_explicit":0.08,"sexual_suggestive":0.71,"minor_sexualized":0,"violence_graphic":0,"self_harm":0,"hate_symbols":0,"weapons":0,"drugs":0},"threshold":0.5,"blocked_by_provider":null,"model":"gemini-2.5-flash"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/moderate-image\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image_url\":\"https://example.com/upload.jpg\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/moderate-image', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"image_url\": \"https://example.com/upload.jpg\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/moderate-video":{"post":{"operationId":"toolModerateVideo","summary":"Check a short video for NSFW and harmful content.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nNSFW and harm scores for a clip, frames and audio — { video_url | video_base64, threshold? }. MP4 or MOV up to 12 MB and 60 seconds, checked before any charge. Returns the same label, flags and scores as moderate-image for the worst moment, plus worst_at_seconds and duration_seconds; nothing is stored. FILE INPUT: if the video is already on the web or your own storage, pass `video_uri` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `video_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"video_url":{"type":"string","description":"https URL of the clip to check (MP4 or MOV, up to 12 MB and 60 seconds)."},"video_base64":{"type":"string","description":"The clip as base64 (a data: URL prefix is accepted). Give this OR video_url. Nothing is stored."},"threshold":{"type":"number","description":"Optional score from which a category counts as flagged, above 0 and at most 1. Default 0.5."}},"required":["video_url"]},"example":{"video_url":"https://example.com/clip.mp4"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/moderate-video","costMicroUsd":20000,"nsfw":false,"label":"safe","flagged":["weapons"],"scores":{"sexual_explicit":0,"sexual_suggestive":0.04,"minor_sexualized":0,"violence_graphic":0.12,"self_harm":0,"hate_symbols":0,"weapons":0.66,"drugs":0},"threshold":0.5,"blocked_by_provider":null,"worst_at_seconds":14.5,"duration_seconds":38.2,"model":"gemini-2.5-flash"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/moderate-video\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"video_url\":\"https://example.com/clip.mp4\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/moderate-video', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"video_url\": \"https://example.com/clip.mp4\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/ocr-id":{"post":{"operationId":"toolOcrId","summary":"Read an ID document into structured JSON.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRead an identity document (Indonesian KTP/SIM/KK/NPWP, or a passport, driving licence or national ID card from any country) into structured JSON — { image_url | image_base64 }. Indonesian documents also get structural NIK verification (region code, encoded birth date and gender) as a confidence signal, not proof of authenticity. Nothing is stored, and no face matching is performed. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}},"example":{"image_url":"https://example.com/ktp.jpg"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/ocr-id","costMicroUsd":5000,"fields":{"document_type":"KTP","issuing_country":"INDONESIA","id_number":"3171014102900002","full_name":"BUDI SANTOSO","birth_place":"JAKARTA","birth_date":"01-02-1990","gender":"PEREMPUAN","address":"JL MEDAN MERDEKA BARAT NO 12","rt_rw":"003/005","village":"GAMBIR","district":"GAMBIR","city":null,"province":null,"expiry_date":"SEUMUR HIDUP","blood_type":"O","nationality":"INDONESIA","religion":"ISLAM","marital_status":"BELUM MENIKAH","sim_class":null},"verification":{"ok":true,"format":true,"region":{"kode":"31.71","kabupaten_kota":"Kota Administrasi Jakarta Pusat","provinsi":"Daerah Khusus Ibukota Jakarta"},"birth_date":"1990-02-01","gender":"P","agrees":{"birth_date":true,"gender":true},"notes":[]},"model":"gemini-2.5-flash"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/ocr-id\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image_url\":\"https://example.com/ktp.jpg\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/ocr-id', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"image_url\": \"https://example.com/ktp.jpg\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/face-detect":{"post":{"operationId":"toolFaceDetect","summary":"Detect faces with boxes, age and gender.","tags":["utility"],"description":"**$0.003000 per call**, deducted from your prepaid balance. Charged only on success.\n\nDetect faces → boxes + score + age/gender, no embeddings — { image_url | image_base64 }. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}},"example":{"image_url":"https://example.com/face.jpg"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/face-detect","costMicroUsd":3000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/face-detect\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image_url\":\"https://example.com/face.jpg\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/face-detect', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"image_url\": \"https://example.com/face.jpg\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/face-embed":{"post":{"operationId":"toolFaceEmbed","summary":"Extract a 512-d embedding for each face.","tags":["utility"],"description":"**$0.006000 per call**, deducted from your prepaid balance. Charged only on success.\n\nDetect every face → 512-d ArcFace embedding per face (+ bbox, score, age/gender) — { image_url | image_base64 }. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.006000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}},"example":{"image_url":"https://example.com/face.jpg"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/face-embed","costMicroUsd":6000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/face-embed\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image_url\":\"https://example.com/face.jpg\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/face-embed', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"image_url\": \"https://example.com/face.jpg\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/face-compare":{"post":{"operationId":"toolFaceCompare","summary":"Compare two faces for similarity and match.","tags":["utility"],"description":"**$0.011000 per call**, deducted from your prepaid balance. Charged only on success.\n\nCompare two faces → cosine similarity + match — { a:{image_url|image_base64}, b:{image_url|image_base64} }. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.011000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"a":{"type":"object","description":"First face to compare: { image_url } or { image_base64 }.","properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}},"b":{"type":"object","description":"Second face to compare: { image_url } or { image_base64 }.","properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}}},"required":["a","b"]},"example":{"a":{"image_url":"https://example.com/a.jpg"},"b":{"image_url":"https://example.com/b.jpg"}}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/face-compare","costMicroUsd":11000}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/face-compare\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"a\":{\"image_url\":\"https://example.com/a.jpg\"},\"b\":{\"image_url\":\"https://example.com/b.jpg\"}}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/face-compare', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"a\": {\n      \"image_url\": \"https://example.com/a.jpg\"\n    },\n    \"b\": {\n      \"image_url\": \"https://example.com/b.jpg\"\n    }\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/kyc-verify":{"post":{"operationId":"toolKycVerify","summary":"Read an ID document and match it to a selfie.","tags":["utility"],"description":"**$0.015000 per call**, deducted from your prepaid balance. Charged only on success.\n\nOnboarding in one call: read an identity document AND compare the photo on it against a selfie — { id_image:{image_url|image_base64}, selfie:{image_url|image_base64} }. Cheaper than tools/ocr-id plus tools/face-compare separately, and the document is fetched once instead of twice. Returns { document:{fields,verification}, face:{similarity,match,threshold} } — measurements only, NO pass/fail verdict, because the threshold that matters is yours. There is no liveness check, so a photo of a photo can match: treat the result as a signal for your own decision, not proof of identity. Nothing is stored. FILE INPUT: if the image is already on the web or your own storage, pass `image_url` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `image_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.015000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id_image":{"type":"object","description":"The identity document: { image_url } or { image_base64 }.","properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}},"selfie":{"type":"object","description":"The selfie to match against the document: { image_url } or { image_base64 }.","properties":{"image_url":{"type":"string","description":"https URL of a JPEG, PNG or WebP image. Give this OR image_base64."},"image_base64":{"type":"string","description":"The image as base64 (a data: URL prefix is accepted). Give this OR image_url. Nothing is stored."}}}},"required":["id_image","selfie"]},"example":{"id_image":{"image_url":"https://example.com/ktp.jpg"},"selfie":{"image_url":"https://example.com/selfie.jpg"}}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/kyc-verify","costMicroUsd":15000,"document":{"fields":{"document_type":"KTP","id_number":"3171014102900002","full_name":"BUDI SANTOSO","birth_date":"01-02-1990","gender":"PEREMPUAN"},"verification":{"ok":true,"region":{"kabupaten_kota":"Kota Administrasi Jakarta Pusat","provinsi":"Daerah Khusus Ibukota Jakarta"},"agrees":{"birth_date":true,"gender":true}}},"face":{"similarity":0.87,"match":true,"threshold":0.35},"model":"gemini-2.5-flash"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/kyc-verify\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"id_image\":{\"image_url\":\"https://example.com/ktp.jpg\"},\"selfie\":{\"image_url\":\"https://example.com/selfie.jpg\"}}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/kyc-verify', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"id_image\": {\n      \"image_url\": \"https://example.com/ktp.jpg\"\n    },\n    \"selfie\": {\n      \"image_url\": \"https://example.com/selfie.jpg\"\n    }\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/stock-fundamentals":{"post":{"operationId":"toolStockFundamentals","summary":"Fetch reported financials from SEC filings.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWhat a US public company reported to the SEC — { ticker, concept?, limit? }. Revenue, net income, assets, liabilities, cash and shares outstanding per fiscal period, newest first, parsed from XBRL. concept narrows to one us-gaap tag. Returns company { name, ticker, cik } and facts[] with concept, unit, period, end, value and the form it came from. NOT a share price.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."}},"required":["ticker"]},"example":{"ticker":"AAPL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/stock-fundamentals","costMicroUsd":10000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193"},"facts":[{"concept":"Revenues","unit":"USD","period":"FY2025","end":"2025-09-27","value":416160000000,"form":"10-K"}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/stock-fundamentals\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/stock-fundamentals', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/stock-filings":{"post":{"operationId":"toolStockFilings","summary":"List recent SEC filings for a company.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nSource documents for a US public company — { ticker, form?, limit? }. Newest first, each with form type, filing date and a direct link. form filters to one type such as 10-K, 10-Q, 8-K or 4. Returns company { name, ticker, cik, sic } and filings[]. An empty list for a valid form is an answer, not an error.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."},"form":{"type":"string","description":"Optional SEC form type to filter to, e.g. 10-K, 10-Q, 8-K, 4. Omit for all forms."}},"required":["ticker","form"]},"example":{"ticker":"AAPL","form":"10-K"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/stock-filings","costMicroUsd":5000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193"},"filings":[{"form":"10-Q","filed":"2026-07-31","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000073/aapl-20260627.htm"}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/stock-filings\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\",\"form\":\"10-K\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/stock-filings', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\",\n    \"form\": \"10-K\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/stock-brief":{"post":{"operationId":"toolStockBrief","summary":"Summarize a US company from SEC filings.","tags":["utility"],"description":"**$0.012000 per call**, deducted from your prepaid balance. Charged only on success.\n\nProfile, latest reported figures and recent filings in one call — { ticker }. Replaces stock-fundamentals plus stock-filings when sizing up a company, and each section degrades on its own so a slow upstream nulls one field rather than failing the brief. Returns company, latest{} keyed by metric, and filings[]. Reported figures only, no market price.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.012000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."}},"required":["ticker"]},"example":{"ticker":"AAPL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/stock-brief","costMicroUsd":12000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193","sic":"Electronic Computers"},"latest":{"Revenues":416160000000,"NetIncomeLoss":112010000000},"filings":[{"form":"10-Q","filed":"2026-07-31","url":"https://www.sec.gov/Archives/edgar/data/320193/aapl-20260627.htm"}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/stock-brief\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/stock-brief', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/insider-trades":{"post":{"operationId":"toolInsiderTrades","summary":"List insider trades from SEC Form 4 filings.","tags":["utility"],"description":"**$0.015000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWho inside a US public company bought or sold its stock — { ticker, limit? }. Parsed from the Form 4s officers, directors and 10% owners must file. Returns trades[] with person, relationship, date, the action in words (sale, open-market purchase, grant, option exercise), shares, price per share and total value, plus the filing URL. limit is Form 4 filings read, default 5, max 20 — each is a separate fetch. Reported trades, not a signal: a Form 4 may be filed up to two business days after the trade.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.015000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."}},"required":["ticker"]},"example":{"ticker":"AAPL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/insider-trades","costMicroUsd":15000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193"},"trades":[{"person":"Newstead Jennifer","relationship":"Officer (General Counsel)","date":"2026-08-18","action":"Sale","code":"S","shares":1439,"pricePerShare":307.49,"value":442478.11,"security":"Common Stock","filed":"2026-08-20","url":"https://www.sec.gov/Archives/edgar/data/320193/000114036126033928/form4.xml"}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/insider-trades\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/insider-trades', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/filing-search":{"post":{"operationId":"toolFilingSearch","summary":"Search the full text of SEC filings since 2001.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nFilings by what they say — { query, ticker?, form?, from?, to?, limit? }. query takes words, quoted phrases, OR and -exclusions; ticker narrows to one company, form to one or more types, from/to to filing dates. Returns total and filings[] with form, filed date, period, companies, the matched document and a direct link, one row per filing.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"query":{"type":"string","description":"What to find in filing text. Words, \"quoted phrases\", OR and -exclusions, up to 200 characters."},"ticker":{"type":"string","description":"Optional US stock ticker to search one company's filings only, e.g. AAPL."},"form":{"type":"string","description":"Optional SEC form type, or up to 5 as an array or comma list, e.g. 10-K or [\"8-K\", \"10-Q\"]."},"from":{"type":"string","description":"Optional earliest filing date, YYYY-MM-DD, 2001-01-01 or later."},"to":{"type":"string","description":"Optional latest filing date, YYYY-MM-DD."},"limit":{"type":"integer","description":"Max filings to return. Default 10, max 100."}},"required":["query"]},"example":{"query":"\"artificial intelligence\""}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/filing-search","costMicroUsd":5000,"query":"\"artificial intelligence\"","total":876,"totalIsLowerBound":false,"filings":[{"form":"8-K","filed":"2026-08-26","period":"2026-08-26","companies":[{"name":"Artificial Intelligence Technology Solutions Inc.","cik":"0001498148","tickers":["AITX"]}],"items":[{"code":"7.01","name":"Regulation FD disclosure"},{"code":"9.01","name":"Financial statements and exhibits"}],"matchedDocument":"EX-99.1","accession":"0001062993-26-004629","url":"https://www.sec.gov/Archives/edgar/data/1498148/000106299326004629/exhibit99-1.htm"}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/filing-search\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\":\"\\\"artificial intelligence\\\"\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/filing-search', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"query\": \"\\\"artificial intelligence\\\"\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/filing-events":{"post":{"operationId":"toolFilingEvents","summary":"List material events from SEC Form 8-K filings.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWhat happened at a US public company — { ticker, item?, limit? }. Each 8-K with its item codes named in words: officer departures (5.02), material agreements (1.01), results (2.02), auditor changes (4.01), cybersecurity incidents (1.05). item narrows to one code. Returns company and events[] with form, filed and event dates, items[] and a link.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."},"item":{"type":"string","description":"Optional Form 8-K item code to filter to, e.g. 5.02 (officer changes) or 1.01 (material agreements)."},"limit":{"type":"integer","description":"Max 8-K filings to return, newest first. Default 10, max 50."}},"required":["ticker"]},"example":{"ticker":"AAPL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/filing-events","costMicroUsd":5000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193"},"events":[{"form":"8-K","filed":"2026-07-30","eventDate":"2026-07-30","items":[{"code":"2.02","name":"Results of operations and financial condition"},{"code":"9.01","name":"Financial statements and exhibits"}],"url":"https://www.sec.gov/Archives/edgar/data/320193/000032019326000018/aapl-20260730.htm"}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/filing-events\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/filing-events', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/ownership-changes":{"post":{"operationId":"toolOwnershipChanges","summary":"List 5% ownership stakes from SEC 13D and 13G filings.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWho holds more than 5% of a US public company — { ticker, type?, limit? }. 13D marks a holder that may seek influence (activist), 13G a passive stake. Returns stakes[] with form, activist, filed and event dates, holders[] with shares and percent, the stated purpose for a 13D, and a link. limit is filings read, default 5, max 10. Pre-December-2024 filings return holder names only.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."},"type":{"type":"string","description":"Optional: \"13d\" for activist stakes or \"13g\" for passive ones. Omit for both."},"limit":{"type":"integer","description":"Max filings to read, newest first. Default 5, max 10 — each one is a separate fetch."}},"required":["ticker"]},"example":{"ticker":"AAPL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/ownership-changes","costMicroUsd":10000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193"},"stakes":[{"form":"SCHEDULE 13G","activist":false,"amendment":false,"filed":"2026-04-29","eventDate":"2026-03-31","holders":[{"name":"Vanguard Capital Management","cik":null,"shares":1099168953,"percent":7.48,"type":"IA"}],"purpose":null,"url":"https://www.sec.gov/Archives/edgar/data/320193/000210011926000139/primary_doc.xml"}]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/ownership-changes\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/ownership-changes', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/institutional-holders":{"post":{"operationId":"toolInstitutionalHolders","summary":"List fund manager holdings from SEC Form 13F filings.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nWhat an investment manager held at a quarter end — { manager, quarter?, issuer?, limit? }. manager is a name or CIK; quarter like 2026Q2, default latest; issuer filters by name or CUSIP. Returns manager, period, totalValue, positions and holdings[] with issuer, cusip, value, shares and percent of portfolio, largest first. Keyed by manager: it does not answer who owns a given company.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"manager":{"type":"string","description":"The investment manager: its name as filed with the SEC (e.g. Berkshire Hathaway) or its CIK."},"quarter":{"type":"string","description":"Optional quarter of the report, e.g. 2026Q2. Default: the latest 13F filed."},"issuer":{"type":"string","description":"Optional filter: a company name fragment (e.g. APPLE) or a 9-character CUSIP."},"limit":{"type":"integer","description":"Max holdings to return, largest first. Default 25, max 200."}},"required":["manager"]},"example":{"manager":"Berkshire Hathaway"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/institutional-holders","costMicroUsd":10000,"manager":{"name":"BERKSHIRE HATHAWAY INC","cik":"0001067983"},"period":"2026-06-30","filed":"2026-08-14","totalValue":299253556246,"positions":29,"holdings":[{"issuer":"APPLE INC","class":"COM","cusip":"037833100","value":65950296923,"shares":227917808,"shareType":"SH","putCall":null,"pctOfPortfolio":22.04}],"url":"https://www.sec.gov/Archives/edgar/data/1067983/000119312526352200/56757.xml"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/institutional-holders\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"manager\":\"Berkshire Hathaway\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/institutional-holders', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"manager\": \"Berkshire Hathaway\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/planned-insider-sales":{"post":{"operationId":"toolPlannedInsiderSales","summary":"List planned insider sales from SEC Form 144 notices.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nInsiders who intend to sell a US public company stock — { ticker, limit? }. Form 144 is filed on or before the sale, so it looks forward where insider-trades looks back. Returns notices[] with person, relationship, shares, market value, percent of outstanding, approximate sale date, broker, how the shares were acquired, 10b5-1 plan adoption dates, sales in the past 3 months and a link. limit is notices read, default 5, max 20.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."},"limit":{"type":"integer","description":"Max Form 144 notices to read, newest first. Default 5, max 20 — each one is a separate fetch."}},"required":["ticker"]},"example":{"ticker":"AAPL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/planned-insider-sales","costMicroUsd":10000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193"},"notices":[{"form":"144","amendment":false,"filed":"2026-08-11","url":"https://www.sec.gov/Archives/edgar/data/320193/000195004726007959/primary_doc.xml","person":"JENNIFER NEWSTEAD","relationship":"Officer","security":"Common","shares":8632,"marketValue":2660900.32,"pctOfOutstanding":0.0001,"approxSaleDate":"2026-08-11","exchange":"NASDAQ","broker":"Morgan Stanley Smith Barney LLC Executive Financial Services","acquired":[{"date":"2026-03-15","how":"Restricted Stock Units","from":"Issuer","shares":8632,"gift":false}],"tradingPlanAdopted":["2026-05-05"],"soldPast3Months":[]}],"noticesRead":5}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/planned-insider-sales\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/planned-insider-sales', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/filing-digest":{"post":{"operationId":"toolFilingDigest","summary":"Extract answers from an SEC filing with cited quotes.","tags":["utility"],"description":"**$0.100000 per call**, deducted from your prepaid balance. Charged only on success.\n\nA model reads a US public company filing and answers from it — { ticker, form?, accession?, question?, compare_to_prior? }. form defaults to 10-K; compare_to_prior also reads the previous filing of the same form and reports what changed. Returns answer, passages[] each matched verbatim against the filing, and links. Flat price for up to 700,000 characters of filing text; larger filings are refused before payment. Never investment advice.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"ticker":{"type":"string","description":"US stock ticker, e.g. AAPL. Case-insensitive."},"form":{"type":"string","description":"Optional form to read, newest first: 10-K (default), 10-Q, 20-F, 40-F, 8-K, 6-K, DEF 14A, S-1 or F-1."},"accession":{"type":"string","description":"Optional accession number of one specific filing, e.g. 0000320193-25-000079. Overrides form."},"question":{"type":"string","description":"Optional question to answer from the filing, up to 500 characters. Omit for the most important disclosures."},"compare_to_prior":{"type":"boolean","description":"Optional. true also reads the previous filing of the same form and reports what changed. Both must fit the 700,000-character cap together."}},"required":["ticker"]},"example":{"ticker":"AAPL"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/filing-digest","costMicroUsd":100000,"company":{"name":"Apple Inc.","ticker":"AAPL","cik":"0000320193"},"filing":{"form":"10-K","filed":"2025-10-31","period":"2025-09-27","accession":"0000320193-25-000079","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927.htm"},"question":"What does the filing say about tariffs?","answer":"Apple names new and higher tariffs as a risk to its costs and margins, and says trade measures can affect its supply chain and demand.","passages":[{"quote":"Tariffs and other trade measures can adversely affect the Company’s business.","supports":"tariffs are a named risk"}],"charsRead":209892,"model":"gemini-3.5-flash-lite"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/filing-digest\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ticker\":\"AAPL\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/filing-digest', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"ticker\": \"AAPL\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/youtube-summary":{"post":{"operationId":"toolYoutubeSummary","summary":"Summarize a YouTube video up to 60 minutes.","tags":["utility"],"description":"**$0.150000 per call**, deducted from your prepaid balance. Charged only on success.\n\nSummarize a YouTube video (Gemini watches the URL) — { url, style?: bullets|paragraph|chapters, language? }; videos ≤60 min.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.150000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"The YouTube video URL to summarise."},"style":{"type":"string","description":"Output style, e.g. \"bullets\"."}},"required":["url","style"]},"example":{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","style":"bullets"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/youtube-summary","costMicroUsd":150000,"summary":"- The video explains ...\n- It then shows ...","video":{"id":"dQw4w9WgXcQ","title":"Example video","channel":"Example Channel","durationSeconds":212}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/youtube-summary\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\"style\":\"bullets\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/youtube-summary', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"url\": \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\n    \"style\": \"bullets\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/extract":{"post":{"operationId":"toolExtract","summary":"Extract typed JSON from a page by schema.","tags":["utility"],"description":"**$0.010000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRender a page and return JSON matching a schema you declare — { url, schema, prompt? }. schema is { field: \"description\" } or { field: { type, description } }, type one of string|number|boolean|string[]. Values are coerced to the declared types; anything the page does not state is null and listed in `missing` rather than invented.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"https URL of the page to extract from."},"schema":{"type":"object","description":"Object describing the fields to extract: { field: \"what it is\" }."}},"required":["url","schema"]},"example":{"url":"https://example.com/product","schema":{"title":"the product name","price":{"type":"number","description":"listed price"}}}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/extract","costMicroUsd":10000,"url":"https://example.com/product","data":{"title":"Widget Pro","price":249000,"in_stock":true},"missing":[]}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/extract\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://example.com/product\",\"schema\":{\"title\":\"the product name\",\"price\":{\"type\":\"number\",\"description\":\"listed price\"}}}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/extract', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"url\": \"https://example.com/product\",\n    \"schema\": {\n      \"title\": \"the product name\",\n      \"price\": {\n        \"type\": \"number\",\n        \"description\": \"listed price\"\n      }\n    }\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/scrape":{"post":{"operationId":"toolScrape","summary":"Scrape a rendered page to clean markdown.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRender a page (JS) → clean markdown — { url, maxChars? } (maxChars >= 1000 trims the page and reports truncated + totalChars).","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"https URL of the page to fetch as markdown."}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/scrape","costMicroUsd":5000,"url":"https://example.com","markdown":"# Example\n\nSome page text..."}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/scrape\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://example.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/scrape', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"url\": \"https://example.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/screenshot":{"post":{"operationId":"toolScreenshot","summary":"Capture a page screenshot as a hosted PNG.","tags":["utility"],"description":"**$0.005000 per call**, deducted from your prepaid balance. Charged only on success.\n\nCapture a page as PNG → hosted URL — { url, fullPage? }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"https URL of the page to capture."},"fullPage":{"type":"boolean","description":"Capture the whole scrollable page rather than the viewport."},"width":{"type":"number","description":"Viewport width in pixels (320-1920)."},"height":{"type":"number","description":"Viewport height in pixels (320-1920)."}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/screenshot","costMicroUsd":5000,"url":"https://api.glianalabs.com/v1/media/ab12cd34.png","source":"https://example.com"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/screenshot\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://example.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/screenshot', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"url\": \"https://example.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/auto-og":{"post":{"operationId":"toolAutoOg","summary":"Render a branded OG card from any URL as a PNG.","tags":["utility"],"description":"**$0.030000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRead a page and render a 1200x630 card in its own colours: logo, name, title, description and the page in a browser frame -> PNG URL. { url, style?: default|ai } - \"ai\" puts the text over a generated background and costs more (see /v1/tools).","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.030000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"url":{"type":"string","description":"https URL to read and build a social card from."},"style":{"type":"string","description":"Optional: \"default\" (the page in a browser frame, in its brand colour) or \"ai\" (a background generated for the page; $0.036, on /v1/tools/auto-og only)."}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/auto-og","costMicroUsd":30000,"sourceTitle":"Example Domain","style":"default","url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/auto-og\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://example.com\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/auto-og', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"url\": \"https://example.com\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/og-image":{"post":{"operationId":"toolOgImage","summary":"Render a 1200x630 OG card from text or a URL.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRender a 1200x630 social/OG card -> PNG URL. With { url, style?: default|ai, title?, subtitle? } it is the auto-og card made from that page, priced as auto-og. Without url, a text card: { title, subtitle?, logo?, image?, accent?, theme?: dark|light, footer? } (logo/image URLs are checked before payment).","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"title":{"type":"string","description":"Headline text, rendered largest."},"subtitle":{"type":"string","description":"Secondary line under the title."},"url":{"type":"string","description":"Optional https page to make the card from (auto-og's card, priced as auto-og: $0.030). With url, title is optional and replaces the page's."},"style":{"type":"string","description":"With url only: \"default\" or \"ai\" (a generated background, $0.036)."},"logo":{"type":"string","description":"Optional https URL of your logo, shown on a white plate; its colour becomes the card colour when no accent is given. A dead or non-image URL is refused before payment."},"image":{"type":"string","description":"Optional https URL of a picture shown framed on the right. A dead or non-image URL is refused before payment."},"accent":{"type":"string","description":"Optional card colour as a hex value, e.g. #635bff. Text turns dark or light to match."},"theme":{"type":"string","description":"Optional: \"dark\" (default) or \"light\", used when there is no accent and no logo colour."},"footer":{"type":"string","description":"Optional short line at the bottom, such as your domain or handle (up to 80 characters). Nothing is added unless you pass it."}}},"example":{"title":"Your headline","subtitle":"a short tagline","accent":"#635bff"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/og-image","costMicroUsd":20000,"url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/og-image\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\":\"Your headline\",\"subtitle\":\"a short tagline\",\"accent\":\"#635bff\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/og-image', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"title\": \"Your headline\",\n    \"subtitle\": \"a short tagline\",\n    \"accent\": \"#635bff\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/youtube-thumbnail":{"post":{"operationId":"toolYoutubeThumbnail","summary":"Render a 1280x720 YouTube thumbnail as a PNG.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRender a 1280x720 YouTube thumbnail (bold outlined title over your background image, or style \"ai\" for one generated from the title at a higher price; not both) -> PNG URL. { title, subtitle?, background? | style?: ai, accent? }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"title":{"type":"string","description":"Headline text, rendered largest."},"subtitle":{"type":"string","description":"Secondary line under the title."},"background":{"type":"string","description":"https URL of a photo to use as the background. Strongly recommended — text on a plain gradient reads as a blog header, not a thumbnail. A dead or non-image URL is refused before payment."},"accent":{"type":"string","description":"Accent bar colour as a hex value, e.g. #f59e0b."},"style":{"type":"string","description":"Optional \"ai\": generate the background from the title ($0.026). Not together with background."}},"required":["title","subtitle"]},"example":{"title":"I tried this for 30 days","subtitle":"the results","background":"https://ai.glianalabs.com/examples/seedream-5-pro.webp"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/youtube-thumbnail","costMicroUsd":20000,"url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/youtube-thumbnail\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\":\"I tried this for 30 days\",\"subtitle\":\"the results\",\"background\":\"https://ai.glianalabs.com/examples/seedream-5-pro.webp\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/youtube-thumbnail', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"title\": \"I tried this for 30 days\",\n    \"subtitle\": \"the results\",\n    \"background\": \"https://ai.glianalabs.com/examples/seedream-5-pro.webp\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/quote-card":{"post":{"operationId":"toolQuoteCard","summary":"Render a shareable quote image as a PNG.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRender a 1200x630 shareable quote image, dark or light -> PNG URL. { quote, author?, theme?: dark|light, accent?, footer? }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"quote":{"type":"string","description":"The quotation to render."},"author":{"type":"string","description":"Who the quotation is attributed to."},"theme":{"type":"string","description":"Optional colour theme: \"dark\" (default) or \"light\"."},"accent":{"type":"string","description":"Optional accent colour as a hex value, e.g. #f59e0b."},"footer":{"type":"string","description":"Optional short line at the bottom, such as your domain or handle (up to 80 characters). Nothing is added unless you pass it."}},"required":["quote","author"]},"example":{"quote":"Make it work, make it right, make it fast.","author":"Kent Beck"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/quote-card","costMicroUsd":20000,"url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/quote-card\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"quote\":\"Make it work, make it right, make it fast.\",\"author\":\"Kent Beck\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/quote-card', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"quote\": \"Make it work, make it right, make it fast.\",\n    \"author\": \"Kent Beck\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/code-image":{"post":{"operationId":"toolCodeImage","summary":"Render a syntax-highlighted code snippet PNG.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRender a code snippet as a syntax-highlighted window image, as wide as its longest line -> PNG URL. { code (up to 400 lines), title?, language?, theme?: dark|light, lineNumbers?: boolean }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"code":{"type":"string","description":"The source code to render."},"title":{"type":"string","description":"Filename shown in the window chrome, e.g. \"app.js\"."},"language":{"type":"string","description":"Language for syntax highlighting, e.g. ts, js, py, go, rust, sql, sh."},"theme":{"type":"string","description":"Optional colour theme: \"dark\" (default) or \"light\"."},"lineNumbers":{"type":"boolean","description":"Optional: true numbers the lines."}},"required":["code","title"]},"example":{"code":"console.log('hello')","title":"app.js","language":"js"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/code-image","costMicroUsd":20000,"url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/code-image\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"code\":\"console.log('hello')\",\"title\":\"app.js\",\"language\":\"js\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/code-image', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"code\": \"console.log('hello')\",\n    \"title\": \"app.js\",\n    \"language\": \"js\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/tweet-image":{"post":{"operationId":"toolTweetImage","summary":"Render a tweet-style card image as a PNG.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nRender a tweet-style card, dark or light, with an initials avatar when none is given -> PNG URL. { text, name?, handle?, avatar?, theme?: dark|light }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"text":{"type":"string","description":"The tweet body to render."},"name":{"type":"string","description":"Display name shown on the card."},"handle":{"type":"string","description":"Account handle shown under the name, without the @."},"avatar":{"type":"string","description":"Optional https URL of the profile picture. Without one, an initials avatar is drawn. A dead or non-image URL is refused before payment."},"theme":{"type":"string","description":"Optional colour theme: \"dark\" (default) or \"light\"."}},"required":["text","name","handle"]},"example":{"text":"shipping > talking","name":"GlianaAI","handle":"glianalabs"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/tweet-image","costMicroUsd":20000,"url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/tweet-image\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\":\"shipping > talking\",\"name\":\"GlianaAI\",\"handle\":\"glianalabs\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/tweet-image', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"text\": \"shipping > talking\",\n    \"name\": \"GlianaAI\",\n    \"handle\": \"glianalabs\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/meme":{"post":{"operationId":"toolMeme","summary":"Render meme text over an image as a PNG.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nTop/bottom outlined captions over an image (a dead or non-image URL is refused before payment) -> PNG URL. { image, top?, bottom? }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"image":{"type":"string","description":"https URL of the background image."},"top":{"type":"string","description":"Caption rendered across the top."},"bottom":{"type":"string","description":"Caption rendered across the bottom."}},"required":["image","top","bottom"]},"example":{"image":"https://ai.glianalabs.com/examples/brainrot-cat-shark.png","top":"one does not simply","bottom":"make a meme api"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/meme","costMicroUsd":20000,"url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/meme\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\":\"https://ai.glianalabs.com/examples/brainrot-cat-shark.png\",\"top\":\"one does not simply\",\"bottom\":\"make a meme api\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/meme', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"image\": \"https://ai.glianalabs.com/examples/brainrot-cat-shark.png\",\n    \"top\": \"one does not simply\",\n    \"bottom\": \"make a meme api\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/card":{"post":{"operationId":"toolCard","summary":"Render a social card sized by preset as PNG.","tags":["utility"],"description":"**$0.020000 per call**, deducted from your prepaid balance. Charged only on success.\n\nTemplated social card sized by preset (og/instagram-square/story/linkedin/podcast), dark or light, optional background photo -> PNG URL. { preset, title, subtitle?, background?, accent?, theme?, footer? }.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"preset":{"type":"string","description":"Output size preset, e.g. \"instagram-square\"."},"title":{"type":"string","description":"Headline text, rendered largest."},"subtitle":{"type":"string","description":"Secondary line under the title."},"background":{"type":"string","description":"https URL of a background photo. A dead or non-image URL is refused before payment."},"accent":{"type":"string","description":"Optional accent colour as a hex value, e.g. #f59e0b."},"theme":{"type":"string","description":"Optional colour theme: \"dark\" (default) or \"light\"."},"footer":{"type":"string","description":"Optional short line at the bottom, such as your domain or handle (up to 80 characters). Nothing is added unless you pass it."}},"required":["preset","title","subtitle"]},"example":{"preset":"instagram-square","title":"Big news","subtitle":"we shipped it"}}}},"responses":{"200":{"description":"Result, plus the payment receipt headers.","content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool id, echoed back."},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."}},"additionalProperties":true},"example":{"tool":"tools/card","costMicroUsd":20000,"preset":"instagram-square","url":"https://api.glianalabs.com/v1/media/ab12cd34.png","contentType":"image/png"}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/tools/card\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"preset\":\"instagram-square\",\"title\":\"Big news\",\"subtitle\":\"we shipped it\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/card', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"preset\": \"instagram-square\",\n    \"title\": \"Big news\",\n    \"subtitle\": \"we shipped it\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/tools/wilayah":{"get":{"operationId":"toolWilayah","summary":"List Indonesian regions down to village level.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge. Official Indonesian administrative regions, all four levels: 38 provinsi, 514 kabupaten/kota, 7,285 kecamatan and 83,762 desa/kelurahan with the official Kepmendagri kode. Call with ?kode=32.73 for one region plus its children (a kabupaten/kota also returns its kecamatan, a kecamatan its desa), ?q=bandung to search by name, ?induk=32.73 to list what sits directly under a region, ?level= to restrict the level, or no params for all provinces. Levels 1-2 carry ibukota, lat/lng, timezone, area and population; levels 3-4 carry kode and nama only, because the decree publishes nothing else at that depth.","security":[],"parameters":[{"name":"kode","in":"query","description":"Official code at any level, e.g. 32 (provinsi), 32.73 (kabupaten/kota), 32.73.05 (kecamatan).","schema":{"type":"string"}},{"name":"q","in":"query","description":"Name search; best match first, kota preferred over kabupaten for an ambiguous name.","schema":{"type":"string"}},{"name":"induk","in":"query","description":"Parent code — lists the regions directly under it (provinsi → kabupaten/kota → kecamatan → desa/kelurahan).","schema":{"type":"string"}},{"name":"level","in":"query","description":"Restrict results to one level.","schema":{"type":"string","enum":["provinsi","kabupaten_kota","kecamatan","desa_kelurahan"]}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"source":"Kepmendagri No. 300.2.2-2430 Tahun 2025","scope":"provinsi + kabupaten/kota (level 1-2) bundled; kecamatan + desa/kelurahan (level 3-4) from D1","count":3,"results":[{"kode":"32.73","nama":"Kota Bandung","level":"kabupaten_kota","induk":"32","ibukota":"Bandung","lat":-6.92222,"lng":107.60694,"timezone":"WIB","utc_offset":7,"luas_km2":167.7,"penduduk":2569107}]}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/wilayah\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/wilayah', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/verify-nik":{"get":{"operationId":"toolVerifyNik","summary":"Verify an Indonesian NIK structurally.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge, no model call, instant. Checks an Indonesian NIK (national ID number) against arithmetic: 16-digit format, the region code in digits 1-4 resolved against official Kepmendagri data, and the birth date and gender the number encodes. Pass &birth_date=DD-MM-YYYY and &gender=L|P to cross-check what a user typed against what the number says — that is what catches a transposed digit. Proves consistency, NOT authenticity: a well-formed fabrication passes.","security":[],"parameters":[{"name":"nik","in":"query","required":true,"description":"16-digit Indonesian NIK. Spaces are tolerated.","schema":{"type":"string"}},{"name":"birth_date","in":"query","description":"Optional claimed birth date to cross-check, e.g. 01-02-1990.","schema":{"type":"string"}},{"name":"gender","in":"query","description":"Optional claimed gender to cross-check: L/LAKI-LAKI/M/MALE or P/PEREMPUAN/F/FEMALE.","schema":{"type":"string"}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"format":true,"region":{"kode":"31.71","kabupaten_kota":"Kota Administrasi Jakarta Pusat","provinsi":"Daerah Khusus Ibukota Jakarta"},"birth_date":"1990-02-01","gender":"P","agrees":{"birth_date":true,"gender":true},"notes":[],"note":"Structural check only: 16-digit format, the region code against official Kepmendagri data, and the birth date and gender the number encodes. It cannot tell a real NIK from a well-formed fabrication."}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/verify-nik\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/verify-nik', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/bmkg":{"get":{"operationId":"toolBmkg","summary":"Get official Indonesian earthquake data from BMKG.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge, no model call. BMKG earthquake records forwarded unmodified. No params returns the single latest quake; ?feed=terkini the last 15 at M5.0 and above; ?feed=dirasakan the last 15 that were felt, each with an MMI intensity per area. Records carry the time in WIB and UTC, magnitude, depth, coordinates, the region and the tsunami-potential line verbatim. Every response includes `attribution: \"Sumber: BMKG\"`; the BMKG terms require that exact string wherever the data is shown, so pass it through if you re-publish.","security":[],"parameters":[{"name":"feed","in":"query","description":"terkini (last 15, M5.0+) or dirasakan (last 15 felt). Omit for the latest quake.","schema":{"type":"string","enum":["terkini","dirasakan"]}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"feed":"autogempa","count":1,"gempa":[{"Tanggal":"22 Okt 2026","Jam":"17:57:49 WIB","DateTime":"2026-10-22T10:57:49+00:00","Coordinates":"-3.11,102.14","Magnitude":"5.2","Kedalaman":"120 km","Wilayah":"Pusat gempa berada di darat 6 km BaratLaut Lebong","Potensi":"Gempa ini dirasakan untuk diteruskan pada masyarakat","Dirasakan":"III Kota Bengkulu, II - III Curup, III Arga Makmur"}],"source":"BMKG (Badan Meteorologi, Klimatologi, dan Geofisika)","attribution":"Sumber: BMKG","source_url":"https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json"}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/bmkg\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/bmkg', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/hari-libur":{"get":{"operationId":"toolHariLibur","summary":"Check Indonesian national holidays and cuti bersama.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge, no model call. Indonesian national holidays and cuti bersama, transcribed from the official SKB 3 Menteri decrees. ?year=2026 returns the whole year (both lists, the decree numbers and a link to the source PDF); ?date=YYYY-MM-DD answers whether one date is a working day, with `hari_kerja` plus `libur`, `cuti_bersama` and `akhir_pekan` separately. Cuti bersama does NOT clear `hari_kerja`: it is optional for private employers under the decree. Only years with a published decree are covered, because Islamic dates depend on a moon sighting; `tahun_tersedia` lists them.","security":[],"parameters":[{"name":"year","in":"query","description":"Whole year, e.g. 2026. Alternative to date.","schema":{"type":"integer"}},{"name":"date","in":"query","description":"YYYY-MM-DD — is this date a working day?","schema":{"type":"string"}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"tanggal":"2026-12-25","hari":"Jumat","libur":true,"cuti_bersama":false,"akhir_pekan":false,"hari_kerja":false,"keterangan":"Kelahiran Yesus Kristus","dasar_hukum":{"nomor":["1497 Tahun 2025 (Menteri Agama)","2 Tahun 2025 (Menteri Ketenagakerjaan)","5 Tahun 2025 (Menteri PANRB)"],"sumber":"https://kemenkopmk.go.id/sites/default/files/pengumuman/2025-09/SKB%20Libur%20Nasional%20dan%20Cuti%20Bersama%20Tahun%202026.pdf"}}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/hari-libur\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/hari-libur', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/references":{"get":{"operationId":"toolReferences","summary":"Find real books and journal articles to cite.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge, no model call. Published books and journal articles from OpenAlex (CC0, 250M+ works) and Crossref (where Indonesian university journals register their DOIs), for bibliographies that have to be real. ?q=<topic> plus optional type=book|article|any, from_year, lang (id, en) and limit 1-10. Each work has title, authors, year, venue, publisher, DOI, an open-access link when one exists, times cited, and a ready APA citation. Check that a work says what you cite it for before quoting it.","security":[],"parameters":[{"name":"q","in":"query","required":true,"description":"Topic, title or keywords, up to 300 characters.","schema":{"type":"string"}},{"name":"type","in":"query","description":"book, article or any (default).","schema":{"type":"string","enum":["any","book","article"]}},{"name":"from_year","in":"query","description":"Only works published in or after this year.","schema":{"type":"integer"}},{"name":"lang","in":"query","description":"Two-letter language code, e.g. id or en.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Works to return, 1-10. Default 5.","schema":{"type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"query":"rendang minangkabau","total":388,"count":1,"works":[{"title":"Rendang: The treasure of Minangkabau","authors":["Muthia Nurmufida","Gervasius Harwin Wangrimen","Risty Reinalta"],"year":2017,"type":"article","venue":"Journal of Ethnic Foods","publisher":"BioMed Central","doi":"https://doi.org/10.1016/j.jef.2017.10.005","language":"en","open_access_url":"https://www.sciencedirect.com/science/article/pii/S2352618117301270/pdf","cited_by":67,"apa":"Nurmufida, M., Wangrimen, G. H., & Reinalta, R. (2017). Rendang: The treasure of Minangkabau. Journal of Ethnic Foods. https://doi.org/10.1016/j.jef.2017.10.005"}],"source":"OpenAlex (CC0), https://openalex.org"}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/references\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/references', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/terbilang":{"get":{"operationId":"toolTerbilang","summary":"Convert a number into Indonesian words.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge, no model call. Indonesian number-to-words for the amount-in-words line required on invoices, kwitansi and cheques. Pass ?n=249000 (Indonesian thousands separators accepted). Returns the plain words and the capitalised rupiah phrasing. Whole numbers only — decimals are not spelled.","security":[],"parameters":[{"name":"n","in":"query","required":true,"description":"Whole number, e.g. 249000 or 249.000.","schema":{"type":"string"}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"number":249000,"terbilang":"dua ratus empat puluh sembilan ribu","rupiah":"Dua ratus empat puluh sembilan ribu rupiah"}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/terbilang\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/terbilang', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/verify-npwp":{"get":{"operationId":"toolVerifyNpwp","summary":"Verify an Indonesian tax number structurally.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge, no model call. A 16-digit NPWP is the holder's NIK (since 2024) and gets the full region, birth-date and gender check; the 15-digit legacy form is decomposed into taxpayer id, KPP code and branch code and checked for structure only. Neither proves the number was actually issued — `checks` says exactly what was tested.","security":[],"parameters":[{"name":"npwp","in":"query","required":true,"description":"15 or 16 digits; dots and dashes ignored.","schema":{"type":"string"}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"format":"legacy15","normalized":"01.234.567.8-901.000","parts":{"taxpayer_id":"012345678","kpp_code":"901","branch_code":"000","is_head_office":true},"nik":null,"checks":["15-digit legacy format: length and structure only"],"notes":["Structure only — the legacy check digit is not verified, so a well-formed number that was never issued will pass."]}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/verify-npwp\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/verify-npwp', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/qris":{"get":{"operationId":"toolQris","summary":"Parse a QRIS code and optionally set an amount.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge, no model call. Decodes a QRIS payment code (EMVCo TLV) into merchant name, city, NMID, acquirer, MCC, currency and amount, and reports whether the CRC-16 is intact — `valid_crc` false means the code is damaged or mistyped and nothing else should be trusted. Add &amount=50000 to also get the same merchant code with that amount set (the standard static-to-dynamic conversion): the merchant account template is preserved byte for byte, the CRC recomputed, and the result re-parsed before it is returned. Does NOT mint a merchant QR — the NMID is issued by an acquirer and is never invented. Test with your acquirer before production use.","security":[],"parameters":[{"name":"payload","in":"query","required":true,"description":"The QRIS string from the QR code.","schema":{"type":"string"}},{"name":"amount","in":"query","description":"Optional amount to set, e.g. 50000. Refused if the source CRC is invalid.","schema":{"type":"string"}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"valid_crc":true,"crc":{"found":"A267","computed":"A267"},"type":"static","merchant_name":"WARUNG CONTOH","merchant_city":"JAKARTA PUSAT","country":"ID","currency":"360","amount":null,"mcc":"5814","nmid":"ID1234567890123","acquirer":"ID.CO.QRIS.WWW"}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/qris\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/qris', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/tools/prayer-times":{"get":{"operationId":"toolPrayerTimes","summary":"Get Islamic prayer times for a place and date.","tags":["utility"],"description":"**Free** — costs nothing against your balance.\n\nNo charge. Jadwal sholat (imsak, subuh, terbit, dzuhur, ashar, maghrib, isya) computed from solar position. Pass ?city=Jakarta Pusat (any Indonesian kabupaten/kota name or kode — the coordinate and timezone come from the official wilayah data) or ?lat=&lng=&tz=. ?days=30 returns a whole month in one call. Methods: kemenag (default, Indonesia), mwl, isna, egypt, makkah, karachi; madhab shafi (default) or hanafi changes ashar only. Calculated times are typically within 1-2 minutes of the official Kemenag table and are not a substitute for a local mosque schedule. Where the sun never reaches the required depression (high latitudes in summer) the affected times are null rather than guessed.","security":[],"parameters":[{"name":"city","in":"query","description":"Indonesian kabupaten/kota name or kode. Alternative to lat/lng/tz.","schema":{"type":"string"}},{"name":"lat","in":"query","description":"Latitude, -90..90. Requires lng.","schema":{"type":"number"}},{"name":"lng","in":"query","description":"Longitude, -180..180.","schema":{"type":"number"}},{"name":"tz","in":"query","description":"UTC offset in hours (7 WIB, 8 WITA, 9 WIT). Defaults to the offset implied by lng.","schema":{"type":"number"}},{"name":"date","in":"query","description":"YYYY-MM-DD. Defaults to today in the target timezone.","schema":{"type":"string"}},{"name":"days","in":"query","description":"Consecutive days to return, 1-31. Default 1.","schema":{"type":"integer","minimum":1,"maximum":31}},{"name":"method","in":"query","description":"Calculation authority.","schema":{"type":"string","enum":["kemenag","mwl","isna","egypt","makkah","karachi"]}},{"name":"madhab","in":"query","description":"Asr shadow rule.","schema":{"type":"string","enum":["shafi","hanafi"]}}],"responses":{"200":{"description":"Data.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"location":{"kode":"31.71","nama":"Kota Administrasi Jakarta Pusat","level":"kabupaten_kota","induk":"31","ibukota":"Menteng","lat":-6.17291,"lng":106.8187,"timezone":"WIB","utc_offset":7},"method":{"id":"kemenag","label":"Kementerian Agama Republik Indonesia","fajr_angle":20,"isha":18,"ihtiyati":true},"madhab":"shafi","note":"Calculated from solar position, typically within 1-2 minutes of the official Kemenag table. Not a substitute for your local mosque schedule.","date":"2026-07-30","times":{"imsak":"04:36","fajr":"04:50","sunrise":"06:07","dhuhr":"12:07","asr":"15:30","maghrib":"18:04","isha":"19:16"}}}}},"400":{"description":"Bad or missing parameters — nothing is charged either way."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/tools/prayer-times\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/tools/prayer-times', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/recipes/image-to-video":{"post":{"operationId":"recipe_image_to_video","summary":"Generate a video from text via an image step.","tags":["recipe","video"],"description":"**$0.525300 per call**, deducted from your prepaid balance. Charged only on success.\n\nRecipe: text → image → animated video (cheapest path to a video; better subject control). Multi-model pipeline from { prompt }. Override steps with { imageModel, videoModel }; { motionPrompt, duration, resolution } tune the video. Returns each step's output + the final url.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.525300"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"Text description of the subject/scene the pipeline should generate."}},"additionalProperties":true},"example":{"prompt":"an italian-brainrot cat-shark hybrid, 3d meme","motionPrompt":"it dances and spins"}}}},"responses":{"200":{"description":"Each step output + final url."},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/recipes/image-to-video\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\":\"an italian-brainrot cat-shark hybrid, 3d meme\",\"motionPrompt\":\"it dances and spins\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/recipes/image-to-video', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"prompt\": \"an italian-brainrot cat-shark hybrid, 3d meme\",\n    \"motionPrompt\": \"it dances and spins\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/recipes/image-to-video-audio":{"post":{"operationId":"recipe_image_to_video_audio","summary":"Generate a video with audio from a text prompt.","tags":["recipe","video"],"description":"**$0.699300 per call**, deducted from your prepaid balance. Charged only on success.\n\nRecipe: text → image → video with native AUDIO. Multi-model pipeline from { prompt }. Override steps with { imageModel, videoModel }; { motionPrompt, duration, resolution } tune the video. Returns each step's output + the final url.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.699300"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"Text description of the subject/scene the pipeline should generate."}},"additionalProperties":true},"example":{"prompt":"an italian-brainrot cat-shark hybrid, 3d meme","motionPrompt":"it dances and spins"}}}},"responses":{"200":{"description":"Each step output + final url."},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/recipes/image-to-video-audio\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\":\"an italian-brainrot cat-shark hybrid, 3d meme\",\"motionPrompt\":\"it dances and spins\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/recipes/image-to-video-audio', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"prompt\": \"an italian-brainrot cat-shark hybrid, 3d meme\",\n    \"motionPrompt\": \"it dances and spins\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/recipes/image-to-video-hd":{"post":{"operationId":"recipe_image_to_video_hd","summary":"Generate an HD video from text via an image.","tags":["recipe","video"],"description":"**$0.550500 per call**, deducted from your prepaid balance. Charged only on success.\n\nRecipe: text → higher-fidelity image → animated video. Multi-model pipeline from { prompt }. Override steps with { imageModel, videoModel }; { motionPrompt, duration, resolution } tune the video. Returns each step's output + the final url.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.550500"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"Text description of the subject/scene the pipeline should generate."}},"additionalProperties":true},"example":{"prompt":"an italian-brainrot cat-shark hybrid, 3d meme","motionPrompt":"it dances and spins"}}}},"responses":{"200":{"description":"Each step output + final url."},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/recipes/image-to-video-hd\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\":\"an italian-brainrot cat-shark hybrid, 3d meme\",\"motionPrompt\":\"it dances and spins\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/recipes/image-to-video-hd', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"prompt\": \"an italian-brainrot cat-shark hybrid, 3d meme\",\n    \"motionPrompt\": \"it dances and spins\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/recipes/brainrot-video":{"post":{"operationId":"recipe_brainrot_video","summary":"Generate a random brainrot character video.","tags":["recipe","video"],"description":"**$0.852500 per call**, deducted from your prepaid balance. Charged only on success.\n\nRecipe: random Italian-brainrot character → animated video with audio (also the brainrot-video model). Multi-model pipeline. Override steps with { imageModel, videoModel }; { motionPrompt, duration, resolution } tune the video. Returns each step's output + the final url.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.852500"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"charge","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"charge","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text description of the subject/scene the pipeline should generate."}},"additionalProperties":true},"example":{"motionPrompt":"it dances and bounces"}}}},"responses":{"200":{"description":"Each step output + final url."},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/recipes/brainrot-video\" \\\n  -H \"Authorization: Bearer gk_your_key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"motionPrompt\":\"it dances and bounces\"}'\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/recipes/brainrot-video', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"motionPrompt\": \"it dances and bounces\"\n  }),\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/session/infer":{"post":{"operationId":"sessionInfer","summary":"Run any of 150+ models over a payment channel (pay-as-you-go).","tags":["media","image-to-video","music","stt","text-to-image","text-to-video","tts","video-to-video","text","image-to-image"],"description":"**$0.0001–$60 per call**, depending on model and input, deducted from your prepaid balance. Quote it first with `GET /v1/price?model=`; the exact amount charged comes back in `x-gliana-charged-micro-usd`.\n\nOpen one Tempo channel and pay many calls with off-chain vouchers; settle on close. Non-custodial — the deposit stays in the on-chain escrow.","security":[{"glianaKey":[]}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.0001","max":"60"},"protocols":[{"mpp":{"method":"tempo","intent":"session","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"mpp":{"method":"evm","intent":"session","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}},{"mpp":{"method":"solana","intent":"session","network":"solana:mainnet","currency":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"Model id or full run id."}},"additionalProperties":true}}}},"responses":{"200":{"description":"Model output + payment receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"example":{"model":"nano-banana-2","costMicroUsd":92400,"output":{"url":"https://api.glianalabs.com/v1/media/8f2c1d9e4a7b3f60.png","contentType":"image/png","sizeBytes":1834127}}}}},"401":{"description":"Unknown or revoked API key. Mint a new one in the dashboard; your balance is unaffected."},"402":{"description":"Insufficient balance — the call was refused before the model ran, so nothing was charged. Top up at https://dashboard.glianalabs.com and retry."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/session/infer\" \\\n  -H \"Authorization: Bearer gk_your_key\"\n# The cost is deducted from the balance behind the key; the exact amount\n# comes back in the x-gliana-charged-micro-usd response header."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/session/infer', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer gk_your_key',\n  },\n});\n\n// Remaining balance, in micro-USD, without a second request:\n// res.headers.get('x-gliana-balance-micro-usd')\nconst data = await res.json();"}]}},"/v1/keys/balance":{"get":{"operationId":"keyBalance","summary":"Check the prepaid balance behind an API key.","description":"**Free** — costs nothing against your balance.\n\nNo charge. Send `Authorization: Bearer gk_…`. Callers who cannot settle per call from a wallet can instead hold a prepaid balance (topped up in the dashboard) and spend it with an API key; every paid endpoint accepts either. Returns the remaining balance in micro-USD.","security":[],"responses":{"200":{"description":"Remaining prepaid balance.","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string"},"balance_micro_usd":{"type":"integer"},"balance_usd":{"type":"string"}}}}}},"401":{"description":"Missing, unknown or revoked API key."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/keys/balance\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/keys/balance', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/consult":{"get":{"operationId":"consult","summary":"Find which endpoint fits what you are trying to do.","description":"**Free** — costs nothing against your balance.\n\nNo charge, and it never runs a model. Pass ?intent=<what you want to do> and get ranked candidate endpoints with their prices. Keyword-matched, not LLM-backed, so treat the result as candidates rather than a decision — confirm with GET /v1/price and GET /v1/schema.","security":[],"parameters":[{"name":"intent","in":"query","required":true,"schema":{"type":"string"},"description":"What you are trying to do, in plain words."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Maximum candidates to return (1-20, default 5)."}],"responses":{"200":{"description":"Ranked candidate endpoints."},"400":{"description":"intent is required."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/consult\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/consult', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/stats":{"get":{"operationId":"stats","summary":"Get call volume, rail status and catalog size.","description":"**Free** — costs nothing against your balance.\n\nNo charge. Activity counts and what is live; no revenue figures are published here.","security":[],"responses":{"200":{"description":"Service statistics."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/stats\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/stats', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/skill.md":{"get":{"operationId":"skill","summary":"Fetch the agent onboarding guide as markdown.","description":"**Free** — costs nothing against your balance.\n\nNo charge. One document an agent can be pointed at to learn how to make its first paid call — frontmatter plus install snippets. Links to the live price and schema endpoints rather than restating them, so it cannot go stale.","security":[],"responses":{"200":{"description":"Markdown with YAML frontmatter.","content":{"text/markdown":{}}}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/skill.md\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/skill.md', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/models":{"get":{"operationId":"models","summary":"List all available models with per-call prices.","description":"**Free** — costs nothing against your balance.\n\nNo charge — browsing the catalog costs nothing.","security":[],"responses":{"200":{"description":"Model catalog.","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/models\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/models', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/schema":{"get":{"operationId":"schema","summary":"Get a model's input fields, types and ranges.","description":"**Free** — costs nothing against your balance.\n\nNo charge. Pass ?model=<id>. Returns each input field with its type/enum/range and a `fileRef` flag for file inputs (image/video/audio) — those take a public URL; upload a local file at POST /v1/media.","security":[],"parameters":[{"name":"model","in":"query","required":true,"description":"Model id or full run id (see GET /v1/models).","schema":{"type":"string"}}],"responses":{"200":{"description":"Model input schema.","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"required":{"type":"array","items":{"type":"string"}},"props":{"type":"object","additionalProperties":true}}}}}}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/schema\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/schema', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/price":{"get":{"operationId":"price","summary":"Get the exact price of a single model call.","description":"**Free** — costs nothing against your balance.\n\nNo charge. Pass ?model=<id> (plus any pricing-relevant fields as query params, e.g. duration/resolution) to get the exact per-call price.","security":[],"parameters":[{"name":"model","in":"query","required":true,"description":"Model id or full run id (see GET /v1/models).","schema":{"type":"string"}}],"responses":{"200":{"description":"Price quote.","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer"},"unit":{"type":"string"},"units":{"type":"integer"}}}}}}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/price\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/price', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}},"/v1/media":{"post":{"operationId":"upload","summary":"Upload a source file and get a hosted URL.","description":"**Free** — costs nothing against your balance.\n\nNo charge. Upload a video / image / audio file to use as a model input (e.g. an image-to-video source, or a video-to-video `video_uri`). Send the raw file as the request body with its Content-Type; max 40 MB. Returns { url } — pass that URL into the model field. Use this when an input is too big for an inline value, or you don't already have a public URL. FILE INPUT: if the video is already on the web or your own storage, pass `video_uri` — we fetch it server-side at datacenter speed, which is the fastest option by far. Sending it inline as `video_base64` is simplest and stores nothing anywhere, but base64 adds ~33% to the bytes and you pay your own upload speed, so it is best under ~1MB. For a large local file, upload the RAW bytes to `POST /v1/media` (free, ≤40MB) and pass the URL: same transfer as base64 minus the 33%, and identity endpoints delete the object as soon as they have read it.","security":[],"requestBody":{"required":true,"description":"Raw file bytes. Content-Type must be video/*, image/*, or audio/*.","content":{"video/*":{"schema":{"type":"string","format":"binary"}},"image/*":{"schema":{"type":"string","format":"binary"}},"audio/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Stored — use `url` as a model input.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"contentType":{"type":"string"},"sizeBytes":{"type":"integer"}}}}}},"413":{"description":"File too large (max 40 MB)."},"415":{"description":"Unsupported type (video/image/audio only)."}},"x-codeSamples":[{"lang":"cURL","source":"curl -X POST \"https://api.glianalabs.com/v1/media\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/media', {\n  method: 'POST',\n});\nconst data = await res.json();"}]}},"/v1/media/{key}":{"get":{"operationId":"getMedia","summary":"Fetch a stored media file by its key.","description":"**Free** — costs nothing against your balance.\n\nNo charge. Serves an uploaded input or a generated output by the key from its /v1/media URL (32-hex id, optional file extension). Responds with the raw file bytes.","security":[],"parameters":[{"name":"key","in":"path","required":true,"description":"Media key from a /v1/media URL — 32 hex chars, optionally followed by a file extension (e.g. 0f...aa.png).","schema":{"type":"string","pattern":"^[0-9a-f]{32}(\\.[a-z0-9]+)?$"}}],"responses":{"200":{"description":"The stored file (content-type matches the upload/output).","content":{"video/*":{"schema":{"type":"string","format":"binary"}},"image/*":{"schema":{"type":"string","format":"binary"}},"audio/*":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Unknown key."}},"x-codeSamples":[{"lang":"cURL","source":"curl \"https://api.glianalabs.com/v1/media/YOUR_KEY\"\n# Free — no key required."},{"lang":"JavaScript","source":"const res = await fetch('https://api.glianalabs.com/v1/media/YOUR_KEY', {\n  method: 'GET',\n});\nconst data = await res.json();"}]}}},"components":{"schemas":{"InferOutput":{"type":"object","properties":{"model":{"type":"string"},"costMicroUsd":{"type":"integer","description":"Amount charged, micro-USD."},"output":{"type":"object","additionalProperties":true,"description":"The model result, nested — NOT spread across the top level. Media models return { url, contentType, sizeBytes } where url is a stable /v1/media link we host; text models (STT, vision, JSON tools) return the provider shape, e.g. { text }."}}},"PromptInput":{"type":"object","required":[],"properties":{"prompt":{"type":"string","description":"Text prompt, or the model-specific input — see GET /v1/schema?model=."}},"additionalProperties":true}},"securitySchemes":{"glianaKey":{"type":"http","scheme":"bearer","description":"A prepaid API key from https://dashboard.glianalabs.com, of the form `gk_…`. Send it as `Authorization: Bearer gk_…`. Calls are charged to the balance behind the key; check it any time with `GET /v1/keys/balance`. A key with insufficient balance is refused before the model runs, so a call never lands you in debt."}}}}