Developer

API Quickstart

GWMM is reachable through OpenRouter’s standard OpenAI-compatible interface. Pick a language, copy the snippet, drop in your GWMM direct API key (gw_live_…), and you’re sending requests to a dedicated, single-tenant inference node with Zero Data Retention.

Gemma 4 12B IT · FP8 OpenAI-compatiblectx 28K · FP8

cURL

Zero-dependency smoke test against the chat completions endpoint. Set $GWMM_API_KEY to a gw_live_… direct key (create one in the Console) in your shell, paste, and run.

curl https://api.gwmmai.com/v1/chat/completions \
  -H "Authorization: Bearer $GWMM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gwmm/gemma-4-12b-it",
    "messages": [{"role": "user", "content": "Say hello in one short sentence."}],
    "max_tokens": 64
  }'

Python (openai SDK)

The official OpenAI Python SDK works against any OpenAI-compatible base URL. Swap the base URL to GWMM, keep your existing direct key.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.gwmmai.com/v1",
    api_key="$GWMM_API_KEY",
)

resp = client.chat.completions.create(
    model="gwmm/gemma-4-12b-it",
    messages=[{"role": "user", "content": "Say hello in one short sentence."}],
    max_tokens=64,
)

print(resp.choices[0].message.content)

API reference

The full OpenAPI schema is available at /openapi.json. Use the embedded reference below for live, auto-generated documentation.

Endpoint reference

EndpointMethodPurpose
/v1/chat/completionsPOSTOpenAI-compatible chat completions
/v1/modelsGETList published models with capability and pricing metadata
/v1/keysGET / POST / DELETEManage direct API keys
/v1/billingGETWallet summary and recent usage
/v1/billing/transactionsGETWallet ledger transactions
/v1/billing/checkoutPOSTCreate a Stripe Checkout top-up session
/v1/billing/portalPOSTCreate a Stripe Customer Portal session
/v1/usageGETAggregated usage for a time window
/v1/requestsGETRequest metadata history (no content)
/healthGETGateway and backend health status
/v1/statsGETPublic status page payload

Error codes

GWMM returns OpenAI-compatible error objects. Example shape: &123;"error": &123; "type": "...", "message": "...", "code": "..." &125;&125;

HTTPtypeMeaningWhat to do
400invalid_requestMalformed request or invalid parametersCheck the request body
401invalid_authAPI key invalid, revoked, or session expiredRefresh your key or re-authenticate
402insufficient_balanceWallet + credit below the minimum thresholdTop up your wallet
403content_policy / unsupported_regionContent policy violation or sanctioned regionDo not retry; review AUP/Terms
429rate_limitedGuest or concurrency limit exceededBack off and retry (read Retry-After)
500internal_errorGateway internal errorRetry; contact support if persistent
502backend_unavailablevLLM backend is unreachableBack off and retry
503draining / maintenanceGateway is draining for maintenanceRetry after the Retry-After interval

Operational limits

  • Concurrency ceiling. 64 simultaneous in-flight requests per API key. Excess returns HTTP 429.
  • First-token timeout. 20 s.
  • Context window. 28K tokens (input + output combined).
  • Precision. FP8, served at advertised precision under load.
  • Data retention. Zero. See Privacy Policy for the full architecture.
  • Authentication. Direct access requires a gw_live_… / gw_test_… key (issued via the Console). OpenRouter customers should point at https://openrouter.ai/api/v1 with their OpenRouter key instead.

MCP (Model Context Protocol)

GWMM also exposes an MCP server so AI agents can call it natively. The MCP endpoint is https://api.gwmmai.com/v1/mcp/sse (HTTP/SSE transport).

Available tools:

  • chat_completion — run a non-streaming chat completion
  • list_models — list models, context windows, and pricing
  • get_balance — return wallet balance and granted credit

For stdio-only MCP clients, use the bridge script mcp_stdio_bridge.py:

python mcp_stdio_bridge.py https://api.gwmmai.com/v1/mcp

Unauthenticated requests are mapped to the acc_guest sandbox (max 64 concurrent, no billing). Authenticated requests use the same Authorization: Bearer header as the HTTP API.

Next steps