Generate Auth Token
POST
/
generate_auth_token
Generate Auth Token
curl --request POST \
--url https://api.perplexity.ai/generate_auth_token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token_name": "Production API Key"
}
'{
"auth_token": "pplx-1234567890abcdef",
"created_at_epoch_seconds": 1735689600,
"token_name": "Production API Key"
}Authorizations
Section titled “Authorizations”Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
application/json
token_name
string
Optional name for the authentication token to help identify its purpose.
Example:
"Production API Key"
Response
Section titled “Response”200 - application/json
Successfully generated authentication token.
auth_token
string
required
The newly generated authentication token. Store this securely as it cannot be retrieved again.
Example:
"pplx-1234567890abcdef"
created_at_epoch_seconds
number
required
Unix timestamp (in seconds) of when the token was created.
Example:
1735689600
token_name
string
The name associated with this token, if provided.
Example:
"Production API Key"
Was this page helpful?
⌘I