SalpXXAPI News
Model Guides 2 min read

Calling GPT models through a gateway: parameters, limits and the bill

The request shape does not change between direct access and a gateway. What changes is parameter strictness, how rate limits are layered, and how retries show up on the invoice.

Same wire format, stricter validation

A gateway speaks the OpenAI protocol, so model, messages and stream work as before1. What actually bites you is parameter drift across model generations:

  • Most newer reasoning models reject a custom temperature; it is either ignored or errors out.
  • The output cap moved from max_tokens to max_completion_tokens; sending both usually means only one takes effect.
  • Some models accept effort-style knobs such as reasoning_effort; older ones return 400 if you pass them.

Cheapest workflow: for a model you have not used, send a minimal request with only model and messages. Once it returns, add one parameter at a time. The error message names the offending field.

Two layers of rate limiting

Vendor limits are two-dimensional — RPM and TPM — and exceeding them returns 4292. Behind a gateway you face two layers:

  • Gateway → you: governed by your group and plan, usually rejected before any upstream quota is spent.
  • Upstream → gateway: the gateway's own key gets 429'd, and it retries or switches channel.

Keep them separate when debugging. If 429s appear as concurrency rises, identify the layer first: check whether the request was rejected before reaching an upstream, or whether the upstream returned 429.

Why the invoice can surprise you

Three recurring causes:

  • A model with no explicit price. Per-call models without a configured price often degrade to token-based estimation, which can be several times off in either direction.
  • Retries billed twice. Most gateways do not double-charge a retry, but the rule should be visible: same request_id, multiple attempts, one charge.
  • Input tokens recomputed every turn. Long context resent in full with no cache hit makes cost grow linearly. In logs this shows up as input tokens dwarfing output tokens — worth a dedicated monitor.

A minimum checklist

  • Probe a new model with a minimal request before trusting its parameter surface.
  • Before raising concurrency, load-test to learn which layer returns 429.
  • Audit model pricing monthly; a model without a price should be priced or delisted.
  • Aggregate logs by request_id and watch the ratio of real requests to retries.

Follow those four and GPT debugging on a gateway usually collapses to half a day.

Sources & attribution

This article references the public materials listed below. Analysis and wording are SalpX's own; quoted material remains the property of its original authors and publishers.

  1. Chat Completions — OpenAI API Reference — OpenAI · accessed 2026-11-11Note:Parameter notes (max_completion_tokens, temperature, stream) follow this reference; per-model support is authoritative there.
  2. Rate limits — OpenAI Platform Guide — OpenAI · accessed 2026-11-11Note:RPM/TPM behaviour and 429 semantics are described in this guide.

One key for Claude, GPT and 50+ models

The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.