Skip to main content
Perplexity

Search documentation

Type to search this documentation.

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"
}
'
title="200"
{
  "auth_token": "pplx-1234567890abcdef",
  "created_at_epoch_seconds": 1735689600,
  "token_name": "Production API Key"
}

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"

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

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu