Quickstart
1
Create an API key
Sign in to the developer console, open API keys, and create a key. New
keys begin with
sk-prism- and are revealed only once.2
Set environment variables
3
Check credits and select a trial chat model
balance_minor is an
aggregate across credit kinds, so /v1/models is the authoritative admission
check. On 402, the example follows the typed error.action; authentication,
policy, rate-limit, and server failures are surfaced unchanged. The command
also intersects the public trial policy with the authenticated catalog, so
it cannot select a hidden or policy-denied model. Paid and organization
accounts should use a chat model approved by their administrator instead of
relying on catalog list position.4
Create a chat completion
x-prism-trace-id: request ID for a later usage lookupx-prism-cost-credits: charged amount in minor creditsx-prism-cache:HITorMISSwhen response caching applies