Use the current operating state instead of probing with paid creation
Public documentation can remain accessible while a model is paused. Your key can also permit an alias that is not ready, or lack permission for an otherwise ready model. These conditions should produce different explanations in your application. Do not infer that all models share one state or that a configured alias proves direct vendor access. A catalog observation has a time; it is useful evidence for that moment, not a permanent reservation of capacity.
What to do next
- 01
Read the exact current catalog row
Call /models from the server and locate the alias the user chose. Record available, the returned reason and the observation time without logging Authorization. Keep a fixture for unavailable states so the interface can be tested without submitting a generation as a health probe.
- 02
Separate readiness from account permissions
Check the key's allowed model scope and relevant allowance independently of the model's available flag. Inspect an error's actual code and message rather than treating every rejection as insufficient funds. A 403 and a 503 can require different actions; changing credentials does not configure an unavailable provider.
- 03
Preserve the user's task until the condition changes
Disable or explain the affected creation path while retaining the prepared input and approval state appropriately. Recheck on a bounded schedule or at a deliberate user action. If readiness changes, obtain any needed fresh quote before submission; do not silently switch to another model because its catalog row happens to be available.
A concrete example
Illustrative state: a user has enough account balance and a key scoped to the selected image alias, but the catalog reports that alias unavailable. The app shows that readiness reason and preserves the prompt. It does not ask the user to purchase another pack, raise max_credits or submit the same paid request repeatedly. Another ready model is a separate choice requiring its own supported-input and price review, not an automatic equivalent.
Admission diagnosis
| Observation | Inspect |
|---|---|
| available=false | Catalog reason and service state |
| 403 | Key scope or relevant allowance |
| 402 | Actual account credit balance |
| 409 | Specific conflict or spending-cap message |
| 503 | Model, pricing, generation or storage readiness |
Before you call it ready
- The exact alias and observation time are retained.
- Readiness, key scope and money are diagnosed separately.
- No paid creation loop or unapproved model substitution is used.
When to stop or choose another method
Stop new submissions for a model that reports unavailable. Wait for an actual operating-state change or choose a separately approved workflow; a documented name and successful login are not readiness evidence.
