The outcome
Operate a stable application integration that respects provider, plan, model, and user-content rules.
Step by step
A workflow you can repeat.
- 01
Confirm the production plan permits the application, document model terms and content policy, and define retention, moderation, rate, concurrency, cost, and incident controls.
- 02
Keep keys server-side, isolate tenants, set application attribution headers, validate inputs, remove secrets and personal data, and prevent user-selected arbitrary model IDs.
- 03
Call a pinned allowlisted model with explicit token, timeout, retry, temperature, schema, and budget limits, using idempotency records for consequential workflows.
- 04
Handle gated, unavailable, cold, delisted, rate-limited, malformed, and unsafe results without silently switching to an unevaluated model or publishing output.
- 05
Log non-sensitive metadata, monitor spend and errors, rotate keys, retest fallbacks, audit license changes, and keep every consequential action behind authorization and human review.
Working standard
What good use looks like.
- Allowlist model IDs server-side.
- Never silently switch models.
- Keep actions behind independent authorization.
Official references