Documentation

Developer docs

Webrana is an OpenAI-compatible gateway. Point your base URL at Webrana, use your sk- key, and keep the rest of your setup.

Overview

Webrana resells access to open-weight and frontier AI models behind one API and one prepaid balance. It speaks the OpenAI Chat Completions API, so existing tools and SDKs work unchanged. Claude models are additionally served on the Anthropic-native /v1/messages endpoint.

Streaming (SSE) and tool/function calling are passed through faithfully — agents built on the OpenAI format work without adjustment. When credits run out, requests are rejected with a clear 402 insufficient_credits instead of a silently truncated response.

Quickstart

  1. Sign in, top up credits, and create an API key — it is shown once, prefixed sk-.
  2. Set your client's base URL and key (below).
  3. Pick a model slug from GET /v1/models and send a request:
bash
curl https://api.webrana.app/v1/chat/completions \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "stream": true,
    "messages": [{ "role": "user", "content": "Hello" }]
  }'

Base URL & keys

  • Base URL: https://api.webrana.app/v1 (local dev: http://127.0.0.1:8787/v1)
  • API key: created in the dashboard, shown once. Send it as Authorization: Bearer sk-….
  • Keys are stored as a hash — we never see the raw value after creation. Create and revoke keys anytime; revocation is effective within ~60 seconds.

Models

46 models are available now, out of 58 in the catalogue. Pass the Model value below as the "model" field. Rates are in credits per 1,000 tokens (1 credit = Rp10) and Cached is the discounted rate for input the provider serves from its cache.

Rates follow upstream costs and can change — fetch the authoritative list any time with GET /v1/models, and see every request's exact charge in your dashboard.

OpenAI

GPT · 18 models
ModelInputOutputCached
gpt-4.19.1236.482.28
gpt-4.1-mini2.289.120.57
gpt-4.1-nano0.572.280.14
gpt-4o11.445.65.7
gpt-4o-mini0.853.420.43
gpt-55.745.60.57
gpt-5-codex5.745.60.57
gpt-5-mini1.4311.40.14
gpt-5-nano0.282.280.03
gpt-5-pro574565.7
gpt-5.15.745.60.57
gpt-5.1-codex5.745.60.57
gpt-5.1-codex-max11.468.41.14
gpt-5.1-codex-mini2.2818.240.23
gpt-5.211.468.41.14
gpt-5.2-codex11.468.41.14
gpt-5.2-pro574565.7
gpt-5.3-chat-latest11.468.41.14

Z.ai

GLM · 8 models
ModelInputOutputCached
glm-4.53.4212.540.63
glm-4.5-air1.146.270.17
glm-4.63.4212.540.63
glm-4.73.9914.250.74
glm-54.5615.960.91
glm-5-turbo1.715.70.34
glm-5.14.5615.960.91
glm-5.26.3820.061.19

Alibaba Cloud

Qwen · 10 models
ModelInputOutputCached
qwen-coder-plus4.5613.680.46
qwen-flash0.282.280.11
qwen-max7.329.182.92
qwen-plus2.286.840.91
qwen-turbo0.281.140.11
qwen3-235b3.9915.960.4
qwen3-235b-instruct3.9915.960.4
qwen3-235b-thinking3.1938.30.32
qwen3-30b-a3b1.144.560.11
qwen3-32b1.716.840.17

Moonshot AI

Kimi · 4 models
ModelInputOutputCached
kimi-k2.63.4214.250.68
kimi-k2.7-code4.3318.240.87
kimi-k2.7-code-highspeed8.6636.481.73
kimi-k313.6868.41.37

xAI

Grok · 4 models
ModelInputOutputCached
grok-4.37.1214.250.71
grok-4.59.1227.360.91
grok-4.69.1227.360.91
grok-build-0.12.858.550.28

DeepSeek

V4 · 2 models
ModelInputOutputCached
deepseek-v4-flash1.25
2.51
3.76
7.52
0.04
0.08
deepseek-v4-pro3.01
6.02
9.03
18.06
0.1
0.2

Two rates apply. The top number is off-peak; the coral number below it is the peak rate, charged 01:00-04:00 and 06:00-10:00 UTC (08:00-11:00, 13:00-17:00 WIB). The rate is fixed when your request starts.

Anthropic

Claude · 10 modelsnot yet enabled
ModelInputOutputCached
claude-fable-5381903.8
claude-haiku-4-54.5622.80.46
claude-opus-4-519951.9
claude-opus-4-619951.9
claude-opus-4-719951.9
claude-opus-4-819951.9
claude-opus-519951.9
claude-sonnet-4-513.6868.41.37
claude-sonnet-4-613.6868.41.37
claude-sonnet-513.6868.41.37

Google

Gemini · 2 modelsnot yet enabled
ModelInputOutputCached
gemini-3-flash1.7114.250.17
gemini-3-pro5.745.60.57

Setup per agent

Any tool that speaks the OpenAI API works. Below are the common ones — swap in your own key and preferred model slug.

opencode

Add a provider in opencode.json (project root or ~/.config/opencode/), then run opencode run --model webrana/glm-5.2 "…".

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "webrana": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Webrana",
      "options": {
        "baseURL": "https://api.webrana.app/v1",
        "apiKey": "sk-xxxxxxxx"
      },
      "models": { "glm-5.2": { "name": "GLM 5.2 (Webrana)" } }
    }
  }
}

Cline / Roo (VS Code)

API Provider → OpenAI Compatible. Base URL https://api.webrana.app/v1, API key sk-…, Model ID glm-5.2.

Aider

bash
export OPENAI_API_BASE=https://api.webrana.app/v1
export OPENAI_API_KEY=sk-xxxxxxxx
aider --model openai/glm-5.2

OpenAI SDK

Set the base URL and key — no other code changes.

typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.webrana.app/v1",
  apiKey: process.env.WEBRANA_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "glm-5.2",
  stream: true,
  messages: [{ role: "user", content: "Hello" }],
});

Claude Code / Anthropic SDK

Claude models use the Anthropic-native /v1/messages endpoint. Point the base URL at Webrana and use your Webrana key (not an Anthropic key). The model must be enabled in the catalog.

bash
# Claude models are served on the Anthropic-native /v1/messages
export ANTHROPIC_BASE_URL=https://api.webrana.app
export ANTHROPIC_AUTH_TOKEN=sk-xxxxxxxx   # your Webrana key, not an Anthropic key
claude

Endpoints

GET/v1/modelsList available model slugs you can pass as "model".
POST/v1/chat/completionsOpenAI Chat Completions. Supports stream and tools. Used by every OpenAI-compatible client.
POST/v1/messagesAnthropic-native Messages API for Claude models (Claude Code / Anthropic SDK).

Request and response bodies are passed to upstream unmodified except for auth and usage accounting — so chunk formats and tool-call payloads match the provider exactly.

Error codes

Errors follow the OpenAI shape: { "error": { "message", "type", "code" } }.

HTTPcodeMeaning
401invalid_api_keyKey wrong or revoked. Revocation takes effect ≤ 60s.
402insufficient_creditsBalance too low for the request estimate. Top up.
404model_not_foundBad model slug — see GET /v1/models.
413context_cap_exceededInput exceeds this key's context cap.
429rate_limit_exceededPer-key RPM exceeded. Honor the Retry-After header.
429daily_cap_exceededOptional daily spend cap reached.
503Upstream provider temporarily unavailable. Retry shortly.

Credits & billing

Access is billed in prepaid credits, where 1 credit = Rp10. Each request reserves an estimate up front, then settles on the upstream's real token usage.

The charge is ceil((input×rate_in + cached×rate_cache + output×rate_out) × multiplier). Cache hits bill at the much cheaper cache rate; reasoning-heavy models carry a higher multiplier. Every request records its exact tokens, credits and latency in your dashboard.

Top up with QRIS or e-wallet in Rupiah. Processing fees are shown transparently before checkout. See the Terms and Privacy Policy for details.

Webrana

Prepaid, OpenAI-compatible AI gateway. Reseller of third-party models, operated during beta from Indonesia.

Product

Legal

© 2026 Webrana. Not affiliated with upstream model providers.