monkgatedocs

Everything you need to call four open models with one key.

Monkgate is an LLM gateway. You sign in with a wallet, top up a balance in USDG, create an API key, and call our models through the OpenAI or Anthropic API you already use. You pay per token. There is no subscription, no seat fee and no email account.

01

What is Monkgate

Monkgate sits between your code and a set of open-weight language models. It gives you a single endpoint and a single key for four models, each tuned for a different job, and it speaks the two wire formats most tools already support.

Who it is for
Developers and agents that want capable models without a monthly plan, a credit card or vendor lock-in.
What you get
OpenAI- and Anthropic-compatible endpoints, real streaming, scoped API keys, per-key rate limits and a full usage ledger.
How you pay
Prepaid credit in USDG on Robinhood Chain. Each request is priced to the token and debited from your balance.
What it is not
Not a chat app and not a subscription. It is infrastructure: you bring the client, we serve the model.
02

How it works

  1. Sign in with your wallet. One signature, no gas, no transaction. It only proves you own the address, which becomes your account.
  2. Top up in USDG. Send USDG on Robinhood Chain from that same wallet. It is credited 1:1 in USD once the block is final, usually about ten minutes.
  3. Create an API key. Keys start with sk-mg-, are shown once and stored only as a hash. You can scope a key to certain models, give it its own rate limit, rotate it or revoke it.
  4. Call the API. Point your OpenAI or Anthropic client at Monkgate. Every request is metered, and its exact cost is written to your ledger.

Try it first without any of this: the console on the home page answers a few questions for free and shows what each one would have cost.

03

Quickstart

Open the dashboard, connect your wallet, add credit under Billing and create a key under API keys. Then:

shell
export MONKGATE_API_KEY="sk-mg-..."

curl https://monkgate.vercel.app/v1/chat/completions \
  -H "Authorization: Bearer $MONKGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "monkgate-om",
    "messages": [{"role": "user", "content": "Write a haiku about latency."}]
  }'
python · openai sdk
import os
from openai import OpenAI

client = OpenAI(base_url="https://monkgate.vercel.app/v1", api_key=os.environ["MONKGATE_API_KEY"])

stream = client.chat.completions.create(
    model="monkgate-om",
    messages=[{"role": "user", "content": "Explain SSE in one paragraph."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
typescript · openai sdk
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://monkgate.vercel.app/v1", apiKey: process.env.MONKGATE_API_KEY });

const res = await client.chat.completions.create({
  model: "monkgate-om",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(res.choices[0].message.content);
python · anthropic sdk
import os
import anthropic

# No /v1 here: the Anthropic SDK appends /v1/messages itself.
client = anthropic.Anthropic(base_url="https://monkgate.vercel.app", api_key=os.environ["MONKGATE_API_KEY"])

msg = client.messages.create(
    model="monkgate-om",
    max_tokens=512,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)
04

Models

Prices are in USD per million tokens. The live list is always available at GET /v1/models, no key needed.

Model idBest forContextInputOutput
monkgate-nirvanaFlagship for hard reasoning, coding and agents1M$1.40$2.80
monkgate-zenBalanced quality and cost for everyday work1M$0.65$1.30
monkgate-koanCapable and inexpensive general model128K$0.22$0.88
monkgate-omFastest and cheapest, with a 1M-token context1M$0.14$0.28

Start with monkgate-om for speed and cost, and move to monkgate-nirvana for hard reasoning, coding and agent loops. The models think before they answer, and that thinking counts toward max_tokens: keep it above about 200, or leave it unset.

05

Authentication

Send your key in either header:

HeaderAccepted on
Authorization: Bearer sk-mg-…All endpoints
x-api-key: sk-mg-…/v1/messages only, which is what Anthropic SDKs send

Every response carries an x-request-id header. Include it when you report a problem.

06

Endpoints

GET /v1/models

Public. Returns the catalog in OpenAI list format, plus name, description, context_length and pricing.

POST /v1/chat/completions

OpenAI Chat Completions format. Supported parameters:

modelmessagesstreamstream_optionsmax_tokensmax_completion_tokenstemperaturetop_ptop_kmin_pfrequency_penaltypresence_penaltyrepetition_penaltystopseedtoolstool_choiceparallel_tool_callsresponse_formatlogit_biaslogprobstop_logprobsreasoning_effort

Any other parameter is dropped. n must be 1 or omitted, and user is never forwarded.

POST /v1/messages

Anthropic Messages format, translated in both directions, streaming included. Supported: model, max_tokens (required), messages, system, stop_sequences, temperature, top_p, top_k, stream, tools and tool_choice, with text, image, tool_use and tool_result blocks.

Not supported: extended thinking blocks (dropped), document blocks (400 error), images inside tool_result (text is kept), and cache_control (ignored).

Default system prompt

If a request has no system or developer message, Monkgate adds a short one (about 60 tokens) so the model introduces itself by its product name. Those tokens count as input. Send your own system prompt and nothing is added.

07

Streaming

With "stream": true the response is text/event-stream. Each event is data: {chunk} and the stream ends with data: [DONE]. Lines are forwarded the moment they arrive; nothing is buffered on our side.

For token usage in the stream, set "stream_options": {"include_usage": true}. The last chunk before [DONE] then carries a usage object. On /v1/messages you get the standard Anthropic events, from message_start to message_stop.

If text arrives all at once, a proxy between you and Monkgate is buffering the stream.

08

Billing

  • Cost = input tokens × input price + output tokens × output price, rounded up to the next $0.000001 per request.
  • Before a request runs, its worst-case cost is held against your balance: the estimated input plus max_tokens, or 4,096 output tokens if you don't set it. Afterwards the exact cost is charged and the hold is released. This is why a 402 can appear while a little balance is left; set max_tokens to avoid it.
  • If you disconnect mid-stream, the model may keep generating to the end, and every generated token is billed. Set max_tokens to cap a request you might abandon.
  • The Usage page in the dashboard shows requests, tokens and cost per day and per model. Every credit and debit is a ledger entry; your balance is their sum.
09

Deposits

  1. Get USDG on Robinhood Chain. Bridge USDC from Ethereum, Base, Arbitrum or another chain with a bridge such as across.to; it arrives as USDG, 1:1 with the dollar. Bridge a little ETH the same way for network fees.
  2. Send it from the wallet you signed in with to the deposit address shown on the Billing page. Deposits are matched to accounts by the sending address, so never send from an exchange.
  3. Wait for finality. The deposit is verified on-chain and credited once its block is final, usually about ten minutes. It is credited exactly once.

USDG is accepted today. Top-ups with the token open when it launches; see below.

10

$MONK

$MONK is Monkgate's own utility on Robinhood Chain. It is launching soon; until then, everything below describes how it will work, and USDG is the way to top up.

Top-up bonus+25% credit on every top-up paid with the token
How it is pricedAt its lowest price of the last 30 minutes, so a short spike can't buy extra credit
Daily limitUp to $100 of token credit per account per day, $1,000 across all accounts. USDG has no daily limit.
HoldingHeld in your signed-in wallet over 24 hours; a quick buy-and-sell doesn't count

Holder tiers

TierHoldRequests / min (account)Per key defaultConcurrent per key
No token—300608
Holder1,000,00060012016
Builder5,000,0001,50030032
Scale20,000,0003,00060064

The token is a utility for paying for and using Monkgate. It is not an investment, and nothing here is a promise about its price or any return.

11

Limits

LimitDefaultNotes
Requests per minute, per key60Can be set lower per key in the dashboard
Requests per minute, per account300Across all your keys
Concurrent requests, per key8Extra parallel calls get a 429

A 429 carries a retry-after header in seconds. Give each tool or agent its own key so you can see its usage and revoke it on its own.

12

Errors

Errors keep each API family's native shape, so SDKs parse them normally.

openai endpoints
{ "error": { "message": "Invalid API key", "type": "invalid_request_error", "param": null, "code": "invalid_api_key" } }
anthropic endpoint
{ "type": "error", "error": { "type": "authentication_error", "message": "Invalid API key" } }
StatusCodeMeaning
400—Malformed request
401invalid_api_keyMissing, wrong or revoked key
402insufficient_quotaBalance too low for this request's hold
403model_not_allowed · account_suspendedThe key or account may not do this
404model_not_foundUnknown model id
429rate_limit_exceeded · concurrency_limit_exceededSlow down; see retry-after
502—Upstream provider error
503—Temporarily overloaded; retry with backoff

An error that happens mid-stream arrives as a final event: data: {"error": …} on OpenAI endpoints, or event: error on /v1/messages.

13

Tools & SDKs

Anything that accepts a custom OpenAI- or Anthropic-compatible base URL works.

OpenAI-compatible base URLhttps://monkgate.vercel.app/v1
Anthropic-compatible base URLhttps://monkgate.vercel.app (no /v1)
API keysk-mg-… from the dashboard
Model idAny id from GET /v1/models
aider
export OPENAI_API_BASE=https://monkgate.vercel.app/v1
export OPENAI_API_KEY=sk-mg-...
aider --model openai/monkgate-nirvana
continue · ~/.continue/config.yaml
models:
  - name: Monkgate Nirvana
    provider: openai
    model: monkgate-nirvana
    apiBase: https://monkgate.vercel.app/v1
    apiKey: sk-mg-...
vercel ai sdk
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { streamText } from "ai";

const monkgate = createOpenAICompatible({
  name: "monkgate",
  baseURL: "https://monkgate.vercel.app/v1",
  apiKey: process.env.MONKGATE_API_KEY,
});

const result = streamText({ model: monkgate("monkgate-om"), prompt: "Hello" });
for await (const text of result.textStream) process.stdout.write(text);

Cline: set the provider to OpenAI Compatible, the base URL to https://monkgate.vercel.app/v1, your key, and a model id such as monkgate-nirvana. Open WebUI: Settings → Connections → OpenAI API, same URL and key; the model list loads by itself.

14

Privacy

  • Prompts and completions are never stored by Monkgate.
  • Requests are routed only to inference providers with a zero-data-retention policy that don't train on your data.
  • Usage logs hold token counts, the model and the time. Nothing else.
  • No email or password. Your wallet is your account.

Be aware: providers still process prompts in memory to answer them, and wallet addresses and payments are public on-chain, permanently.