Create an API key
Mint a scoped key. The secret is returned once.
Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "object": "api_key", "id": "string", "name": "string", "prefix": "string", "scopes": [ "*" ], "status": "active", "label": "string", "agent_id": "string", "created_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "allowed_ips": [ "string" ], "limit_micro": 0, "limit_reset": "day", "usage_micro": 0, "limit_remaining_micro": 0, "secret": "string"}Test a vendor key before saving it POST
Call the provider's free, read-only test endpoint with a key that is not stored yet. Nothing is saved; the key is used for this one call. Never charged; the call is logged.
Set a key's credit limit PUT
Cap what one key can spend, resetting daily, weekly, monthly or never. null removes the cap. Calls over the cap fail with budget_blocked.