Skip to main content

Run an integration in production

After your first successful request, verify the features and failure handling your application depends on. The same account owns its keys, AI balance and Usage history.

Before sending production traffic​

CheckReady when
Model and protocolThe selected model completes your actual text, stream, tool or file workflow; see API formats
Keys and spendingProduction has its own key, a named account owner, and an appropriate monthly cap
Failure handlingYour application distinguishes invalid requests, exhausted credit, temporary limits and uncertain outcomes; see Errors & Limits
Request trackingYou retain safe identifiers and can locate a request and its charge in Usage
Data and accessThe relevant storage, expiry and provider handling meet your team's requirements

Compatibility and model changes​

Check API formats and the selected offering's published capabilities. Exercise streaming, tool results, images or structured output if your application uses them. Refresh discovery after an unavailable-model error. Keep model selection configurable and review model withdrawals before a retirement affects saved configurations.

Understand routing​

There are separate choices to understand:

  • Offering/model: what your request selects. The model-router offering is a model-selection service; see its contract and billing.
  • Requested routing mode: Auto, Economy or Verified where the offering's public catalogue exposes that choice. A label in documentation does not enable a route.
  • Served routing tier: the execution tier recorded for the actual request and shown in Usage. It may differ from the requested mode. It is distinct from the model's creator.

Use the choices actually published in Catalog. Setup's examples use the default Auto path and require a currently available compatible offering. A Verified tier label describes routing semantics; it is not an uptime, compliance or data-residency guarantee. Availability and billing remain specific to the selected offering.

Current direct Gateway requests in these guides resolve the configured Auto mode. Auto does not promise a per-request price auction, model substitution, or automatic retry after a failure. Economy and Verified catalogue labels describe configured routing choices, not an undocumented request-header/body override. Do not send another gateway's provider-routing object to Primex. Review the published operation contract before changing a routing setting.

Handle limits and uncertain outcomes​

The Errors & Limits guide distinguishes temporary throttling from monthly cap and balance failures. An exhausted cap is not fixed by rapid retries; an exhausted balance needs funding. Honor retry headers when present.

Set appropriate client timeouts, cancellation and retry policies for the operation. Inspect an SDK's automatic retries instead of accepting them blindly. If a connection drops after dispatch, the operation may have completed: inspect its request ID and Usage before starting another paid operation. Follow the endpoint's file/job and operation-ID rules. Do not assume all endpoints replay duplicate requests.

For streams, handle protocol error events as well as the initial HTTP status. Streaming and Billing explain delivered output, broken-stream protection and partial delivery. A 200 status alone does not establish a complete successful stream.

Investigate a request​

  1. Preserve the returned Primex request identifier in your application logs.
  2. Open Usage, narrow the period, offering or key, and inspect the request's details.
  3. Review recorded outcome, timing, routing tier and charged/refunded components.
  4. Use Billing for account funding/movements.
  5. Contact Support with the request identifier, time, offering and safe error details. Do not include keys or private input.

Keep your own request logs free of secrets. Usage reports request/billing metadata; it is not a copy of all your prompts, files and responses. Follow the Usage walkthrough for filters, components and safe correlation records.

Protect access and assess data handling​

Use separate keys for local, CI and production environments so a rotation can be narrow. Keep them on trusted servers or local tool environments. Review API Keys, team evaluation and the Privacy Policy for current ownership, retention and deletion scope.