Create a key
- Sign in at platform.fortytwo.network.
- Open Credits, press Buy credits, choose an amount, enter your card and confirm. Every request is charged to this balance — see Pricing.
- Open API keys and press Create key (New key if the account already has keys).
- Enter a Name. Optionally set Spend limit, Limit resets and Expiration, then press Create key.
- Copy the key. It is shown only once.
Send the key
Send the key in theAuthorization header of every request. A request with a body also needs Content-Type: application/json. Keys start with sk-ft-v1-.
FORTYTWO_API_KEY.
401 invalid_api_key.
Key and account settings
Spend limits
- Both limits are checked when a request starts. A request that is already running finishes and is charged, so spend can end above a limit by the cost of the requests in progress. Each running request can cost up to a maximum-length request for its model.
- A key over its Spend limit gets
429 billing_limit_exceeded. Any key on an account over its Monthly spend limit gets402 account_spend_limit_reached. - Buying credits does not clear either error. They clear when the limit resets, or when the limit is raised or removed.
- To change a key’s limit: in API keys, find the key in the list (use Search by name if you have many keys). Open its ⋯ menu, choose Edit, change Spend limit and press Save. Leave the field empty to remove the limit; the reset schedule is removed with it. The reset can’t be changed after the key is created.
- To change the account limit: on Credits, under Usage limits, enter the amount in Monthly spend limit and press the check mark to apply it.
- A Monthly spend limit of $0 blocks all new requests. Changing the limit does not reset the month’s spend.
Track usage
Both keep 12 months of history. Prompts and responses are not shown.