use-case

Gateway beginner guide: from signup to calls and billing checks

Direct answerFollow signup, marketplace verification, funding, a bounded API key, a minimal test, and Request-ID log lookup in that order to isolate problems and control spend.

Updated · Reviewed

First understand what a gateway is

A gateway exposes several AI models to clients and applications through one service. A call needs a base URL, gateway API key, exact model ID, and a matching endpoint or protocol. A chat subscription, provider key, and gateway key are normally separate credentials. Changing only a model name does not make OpenAI, Anthropic, and Gemini request bodies interchangeable.

Complete the journey in this order and verify one variable at each step:

Sign up/sign in → Model marketplace → Fund/redeem → Create API key
                   ↓
Online or minimal test → Usage/task logs → Support with Request-ID

Step 1: access and protect the account

Start at register or sign in. Email verification, invite codes, third-party login, passkeys, and two-factor authentication depend on site configuration. Do not assume a method is available when the page does not show it. Use personal settings for the security options enabled on this site.

Use a unique password and enable the available stronger authentication. If a key leaks, disable or delete it in key management, create a replacement, and update clients. Renaming a key does not rotate it. Never paste complete credentials into chat, screenshots, tickets, or source control.

Step 2: choose a model before funding

Open the model marketplace and verify the exact model ID, supported endpoint, available group, and current price or billing unit. A model in provider documentation is not a promise that this site offers it. A marketplace display label or family name may not be a callable model value.

Start with a lower-cost text model for connectivity. Image, video, audio, reranking, and agent workloads can use different endpoints, bodies, and billing units. When the model detail offers an online test or sample code, prefer the configuration generated for that exact model, group, and endpoint.

Step 3: fund the account and separate two limits

The funding and wallet page shows the payment, redemption, plan, or other credit methods enabled by this site; not every deployment enables every method. After payment, inspect funding history and order status before retrying an unfinished order. Confirm currency, amount paid, credited quota, and scope before committing.

Account balance funds total consumption. API-key quota or request count is an additional ceiling for one credential and does not add money to the account. A funded account with an exhausted key, or an unlimited key on an empty account, can still fail. Subscription, level, and group entitlements may further limit models; use current UI state as authority.

Step 4: create the first API key

Open API-key management. For a first call, use a recognizable name, one currently available primary group, a reasonable expiry, and a small test quota. Leave model restrictions, IP allowlists, fallback groups, cross-group retry, and complex routing preferences off until the minimal call works, then tighten them one by one.

A group is a routing and billing scope, not a folder. It can affect model access, route, and price. Select a group shown as usable for the model. Fallback groups and automatic retries may change the effective route and cost. Store the copied key only in a server-side environment variable or a trusted client's secret setting.

Step 5: make the shortest first call

Use one of these paths: the model detail's online test, the console playground, or the minimal curl in the AI API quickstart. The first two verify site configuration with less setup; curl is best for excluding a third-party client or SDK.

Query the models visible to the key before calling the endpoint shown in model detail:

export BASE_URL="https://your-service.example"
export API_KEY="your-gateway-key"

curl "$BASE_URL/v1/models" \
  -H "Authorization: Bearer $API_KEY"

A successful /v1/models request verifies basic service and key access, not every model, endpoint, or field. Next, copy an exact marketplace ID and make one short text request. Add streaming, images, tools, long context, and optional parameters only after that succeeds.

Step 6: map four fields in an external client

Labels differ by client, but the mapping is stable:

  • Provider / API type: select the OpenAI, Anthropic, Gemini, or other protocol matching the endpoint, not a protocol guessed only from the model brand.
  • Base URL / API Base: use this site and include /v1 only when the client expects it; do not produce /v1/v1 or omit the protocol path.
  • API Key / Token: use a complete key created by this site; do not mix provider keys, and confirm that the copied key is complete and enabled.
  • Model: use the exact marketplace model ID, not a display label, shorthand, or family name.

If automatic discovery fails, do not change every setting at once. Capture the client's redacted effective URL, protocol, and error, then compare it with minimal curl using the same address, key, model, and endpoint.

Step 7: find results and charges by Request-ID

Inspect synchronous text calls in usage logs. For asynchronous image, video, or audio work, also inspect task logs or the matching generation log. A task ID or accepted response means submission, not completed media; do not immediately resubmit while waiting.

Retain and search the Request-ID, task ID, time, model, group, path, status, and final consumption. Treat the final consumption log as the billing record: a reservation may be supplemented or refunded at settlement, while a retry can become another real upstream call. See billing and cost reconciliation.

Common symptom checklist

  • Empty model list or unavailable model: check key status and expiry, group, and model restrictions, then confirm the exact ID and endpoint available to this key.
  • 401: check the Authorization header and complete active key; copy again and remove whitespace or provider-key mixups.
  • 403 or insufficient quota: compare account balance, key quota/count, group and level across the wallet, key settings, and logs.
  • 404 / model not found: verify Base URL, /v1, exact model ID, and endpoint, then compare the model-detail sample with minimal curl.
  • 400: verify JSON, protocol, fields, and context size; remove optional fields and keep a minimal body.
  • 429: read the error body and separate funding/quota, rate, and group capacity; fix funding errors and retry only temporary limits with bounded backoff.
  • Timeout or 5xx: check whether a usage or task record already exists and search Request-ID or task ID before resubmitting.
  • HTTP 200 without text: inspect in-stream errors, tool calls, safety refusal, and finish reason; retain redacted events and use troubleshooting.

See the API troubleshooting guide for full status-code and retry boundaries. Never loop indefinitely on 400, 401, 403, insufficient balance, or a known validation error.

Safe support checklist

If the problem remains, open a support ticket with time, exact model ID, group, path, HTTP status, Request-ID or task ID, client and version, redacted request structure, and error body. State whether minimal curl succeeds; this sharply narrows the fault domain.

Remove complete API keys, passwords, payment credentials, identity data, image Base64, personal data, and business secrets. If exposure is suspected, disable and rotate the key before opening the ticket. Support can investigate by Request-ID without the complete credential.

Use cases

  • Register and use this gateway for the first time
  • Select a model, fund the account, create a key, and configure a client
  • Find a call, reconcile cost, and open a safe support ticket

API protocols

  • /v1/models
  • /v1/chat/completions

FAQ

Are API key, gateway token, and model token the same thing?

The gateway UI calls an API key a token. Input and output tokens used for model metering are text units, not credentials. Never disclose the complete gateway token.

Why can a request fail for insufficient quota when my account has balance?

Account balance funds total use, while each API key can have its own quota and request-count limits. Either layer, key expiry, or key disablement can block a call; inspect key settings and usage logs separately.

Should Base URL include /v1?

It depends on how the client joins paths. Use the site root if it appends /v1 automatically, or the /v1 API base when requested. The effective request must not contain /v1/v1.

Why does the marketplace list a model that my client reports as not found?

You may have copied a display label instead of the exact ID, selected a key group or model restriction that cannot use it, or called an unsupported endpoint. Use the model detail and the models visible to the current key.

What should I do if funding does not appear immediately?

Check order status and funding history first and do not immediately pay again. Payment options and settlement depend on site configuration. If it remains missing, provide the order reference and time, never an API key or payment password.

What information belongs in a support request?

Include time, exact model ID, path, HTTP status, Request-ID or task ID, client name, and a redacted error body. Do not include keys, passwords, payment credentials, or unredacted business data.

Official sources

  1. OpenAI Developer Quickstart Official
  2. Gemini API Key Best Practices Official
  3. OpenAI Error Codes Official