API guides

Production checklist

Before sending production traffic, verify the full path from your server to the model and back. Keep costs bounded, handle partial failures, and make requests diagnosable without exposing credentials.

Credentials and budget

  • Use a dedicated production key stored in a secret manager; keep development keys separate.
  • Set a deliberate key spend cap, check account credits, and monitor balance. A daily cap is not an instantaneous hard stop.
  • Know who can revoke or replace the key. Test the replacement process before an emergency.

Request behavior

  • Verify the exact model ID and required capabilities, including tools, schemas, images, and context length.
  • Set application timeouts and a concurrency limit appropriate to your account. Include queue time in your overall deadline.
  • Use bounded retries and honor Retry-After for temporary limits. Stop retrying invalid keys or exhausted budgets.
  • Propagate user cancellation to upstream streams and show partial output as incomplete.

Safety and observability

  • Validate tool arguments and structured responses. Enforce authorization outside the model.
  • Make side effects idempotent or explicitly deduplicated. Retrying a generation must not duplicate a payment or message.
  • Record timestamps, model IDs, latency, status, and request identifiers when available. Redact keys and sensitive prompts.
  • Reconcile sample charges against Activity. Test error, timeout, and disconnected-stream paths, not just successful replies.

Launch and support

Start with a small rollout, watch error rates and costs, and expand only after the results match expectations. Confirm privacy, retention, and compliance requirements with support before sending sensitive workloads; this checklist does not establish a data-retention policy.