keyAuthentication

Validate API tokens and authenticate requests

Authentication

The Snack Prompt API uses API Key authentication. Include your API key in the x-api-key header with every request.

Required Headers

Header
Value
Required

x-api-key

Your API key

Yes

Content-Type

application/json

For POST/PUT requests

Validate API Token

get

Validates the API token and returns the authenticated user's details, such as ID and email.

circle-check
Authorizations
x-api-keystringRequired

API Key authentication. Get your key at snackprompt.com/api-keys.

Example: x-api-key: sk-your-api-key-here

Responses
chevron-right
200

Token is valid

application/json
codeintegerOptionalExample: 200
get
/v1/auth/token/validate

Last updated

Was this helpful?