Documentation

MaxonForge API docs

One account, one key, one base URL for every enabled model. The gateway speaks the OpenAI Chat Completions format and the Anthropic Messages format — point an existing SDK at it with a base-URL change.

Quick Start

New to pay-as-you-go? The step-by-step pay-as-you-go tutorial walks through sign-up, credit, API keys and your first request with copy-paste examples.

  1. Create an account and add credit (top up from ₹100).
  2. Create an API key in the dashboard.
  3. Point your client at https://www.maxonforge.com/v1.
  4. Call any enabled model — see Models.
curl https://www.maxonforge.com/v1/chat/completions \
  -H "Authorization: Bearer $MAXONFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-chosen-model",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Authentication

Every request carries your key as a bearer token. Anthropic-style clients may instead send it in the x-api-key header — both work.

Authorization: Bearer sk_mf_...        # OpenAI-style clients
x-api-key: sk_mf_...                   # Anthropic-style clients

Keys are shown once at creation and stored hashed — keep yours safe. You can revoke or rotate a key at any time from the dashboard.

API Keys

Create, name, restrict and revoke keys in the dashboard under API Keys. A key can be limited to specific models; it inherits your account's limits (concurrency, RPM). Usage is billed to the same prepaid balance for every key on the account.

API Key Status

The public Check an API key page shows a key's current status, usage, limits and model access — no sign-in required. Paste the key and press Inspect; it works without an account because the key itself is the credential.

What the checker shows

  • Key summary: name, protocol, status, created date.
  • Usage: request count, the credits consumed and the current prepaid balance.
  • Limits: only values actually configured on your account — anything unlimited is shown as No limit, never a placeholder number.
  • Model access: your key's allow-list, or All eligible published models when unrestricted.
  • One Last request summary: when, which endpoint family, which public model, status and latency.

What it never shows

  • The full API key — the result displays a masked form only (the secret never loops back to the page).
  • Request history — this is a status checker, not a log viewer: exactly one last-request summary, no bodies, headers or conversation content.
  • Account data beyond this key — no email, payment history, other keys or internal identifiers.

Checks are rate-limited per address to prevent key guessing. If a check says the key was not found, verify it starts with sk_mf_ and hasn't been revoked in the dashboard.

OpenAI-compatible API

Use any OpenAI SDK or tool with a base-URL change. Chat Completions and streaming are supported.

from openai import OpenAI

client = OpenAI(
    api_key="sk_mf_...",
    base_url="https://www.maxonforge.com/v1",
)

resp = client.chat.completions.create(
    model="your-chosen-model",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
)
for chunk in resp:
    print(chunk.choices[0].delta.content or "", end="")

Anthropic Messages-compatible API

The gateway also serves the Anthropic Messages wire format at https://www.maxonforge.com/v1/messages, so Anthropic Messages-compatible clients (including Claude Desktop configurations that accept a custom endpoint) work by overriding the base URL and key. This is MaxonForge's own compatible endpoint — model availability is the published catalogue.

curl https://www.maxonforge.com/v1/messages \
  -H "x-api-key: $MAXONFORGE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-chosen-model",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Claude Desktop setup

Claude Desktop talks to the gateway with two values and nothing else: the base URL and your API key.

Use the bare origin as the base URL — Claude Desktop appends /v1/models and /v1/messages itself. A base URL that already ends in /v1/messages doubles the path and returns 404.

Base URL: https://www.maxonforge.com/v1
API key:  sk_mf_…  (your pay-as-you-go key — copy it from your dashboard)

1. Open Claude Desktop → Settings → Developer → Edit Config
2. Set the endpoint / base URL to https://www.maxonforge.com/v1
3. Paste your key as the API key
4. Save, then fully restart Claude Desktop

Your key is shown — and can be copied again at any time — on your dashboard under API Keys. Keep it private: anyone holding it can spend your prepaid balance.

Not sure whether a key is still live? Paste it into Check an API key — it reports the key's status and remaining balance without storing it.

Models

The live, published model list is served by the gateway itself — the same table shown on the public Models page. Prices are per 1M tokens and shown with each model.

curl https://www.maxonforge.com/v1/models

Usage

Per-request usage is returned in the response body exactly like the native formats, and your remaining balance is available at any time:

curl https://www.maxonforge.com/v1/usage -H "Authorization: Bearer $MAXONFORGE_API_KEY"

The dashboard Usage page charts the same data over time.

Wallet / prepaid

Prepaid credit never expires and is consumed per request at the model's published rate. Top up with UPI or card from the dashboard, from ₹100. There is no subscription and nothing renews. A request that would exceed the balance is rejected before it reaches a model — there are no surprise overdrafts.

Errors

Errors use the native format of the endpoint you called. Common codes:

  • 401 authentication_error — missing/invalid key
  • 403 model_not_allowed — the key's model allow-list excludes this model
  • 404 model_not_found — not in the published catalogue
  • 429 rate_limit — account concurrency/RPM limit reached; retry shortly
  • 402 insufficient_credits — balance empty; top up in the dashboard

Code examples

Node (OpenAI SDK):

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.MAXONFORGE_API_KEY,
  baseURL: "https://www.maxonforge.com/v1",
});

const completion = await client.chat.completions.create({
  model: "your-chosen-model",
  messages: [{ role: "user", content: "Explain streaming in one line." }],
});

Anthropic SDK:

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.MAXONFORGE_API_KEY,
  baseURL: "https://www.maxonforge.com/v1",
});

const message = await client.messages.create({
  model: "your-chosen-model",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello!" }],
});

Google Analytics & Tag Manager

MaxonForge installs the Google tag for you. The Google Tag Manager container ID and the Google Analytics 4 measurement ID are configuration, not code: enter them once in Admin → Marketing → Google Analytics & Tag Manager and they are served to every visitor. Replacing an ID later is another admin save — no code change and no redeploy.

Where the IDs come from

  • Create a GTM container: tagmanager.google.com → create an account, then a Web container for your domain. The install snippets are shown once, after creation.
  • GTM container ID: the GTM-XXXXXXX value in the account/container header (and in Admin → Container Settings).
  • GA4 measurement ID: analytics.google.com → Admin → Data streams → your web stream. The G-XXXXXXXXXX value.

Tag Manager or direct GA4?

  • Use GTM when you want to manage Google tags (and their triggers) from the GTM interface, or use other GTM tags. GA4 is then configured inside the container.
  • Use the direct Google tag when you only need GA4 page views and events and would rather not maintain a container. MaxonForge loads gtag.js with your measurement ID.
  • Only one of the two ever installs. GTM is the container/manager: while a container is enabled the direct Google tag stays switched off, so two GA4 installations can never load at once.

Consent

Measurement is on by default: when Require consent is on, the tag is skipped only for a visitor who has stored an opt-out in this browser, and every other visitor is measured without a consent prompt. Google Consent Mode defaults are set before the tag loads and mirror that effective state (granted unless the visitor opted out). The opt-out control lives on the Cookie Policy page (/legal/cookies) — never in Google.

Testing the installation

Use Test installation on the admin page: it verifies the saved configuration, both ID formats, the public browser payload (no secrets), snippet generation, duplicate-tag protection and stored opt-out handling. Google-side receipt is a separate check — GTM's Preview mode and GA4 Realtime show what actually arrives, because no server can verify another company's tag processing.

Replacing an ID later

Paste the new container/measurement ID into the same admin page and save. Nothing in this codebase references a container or measurement ID, so the change is live for new page loads immediately. A browser tab that already installed a tag keeps exactly one tag until it is reloaded — intentional, so no page ever loads two Google tags.

Need a hand?

Support answers from the dashboard, usually within a day.

Contact support