Skip to main content
POST
/
keys
Create API Key
curl --request POST \
  --url https://api.fal.ai/v1/keys \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "alias": "Production Key"
}
'
{
  "key_id": "abc123def456",
  "key_secret": "sk_live_abc123def456xyz789",
  "key": "abc123def456:sk_live_abc123def456xyz789"
}

Authorizations

Authorization
string
header
required

Admin API key must be prefixed with "Key ", e.g. Authorization: Key YOUR_ADMIN_API_KEY

Body

application/json

Request body for creating a new API key

alias
string
required

Required friendly name for the API key

Required string length: 1 - 255
Example:

"Production Key"

Response

API key created successfully. Store the key_secret securely - it will not be shown again.

Response containing the newly created API key credentials. The key_secret is only returned once.

key_id
string
required

Unique identifier for the newly created API key

Example:

"abc123def456"

key_secret
string
required

Secret portion of the API key. IMPORTANT: This is only returned once at creation time and cannot be retrieved again.

Example:

"sk_live_abc123..."

key
string
required

Full API key in the format 'key_id:key_secret'. Use this value directly for API authorization. IMPORTANT: This is only returned once at creation time and cannot be retrieved again.

Example:

"abc123def456:sk_live_abc123..."