Skip to main content
POST
/
v0
/
auth
Generate Access Token
curl --request POST \
  --url https://api.interhuman.ai/v0/auth \
  --header 'Content-Type: application/json' \
  --data '
{
  "key_id": "<string>",
  "key_secret": "<string>",
  "scopes": [
    "interhumanai.upload"
  ]
}
'
{
  "access_token": "0f3c6b8a7b8a4c3e9f6bBsb2FkIGludGVyaHVtYW5haS5zdHJlYW0ifQ.uIseMhfnVWacCMCzIOY",
  "token_type": "Bearer",
  "expires_in": 900,
  "scope": "interhumanai.upload"
}

Authenticate with access tokens

Interhuman uses short-lived bearer tokens for every request. Use your issued key pair to exchange for an access token, then send that token on HTTP or WebSocket calls. If you still need a key, start with Get an API key.

Response Headers

X-Correlation-ID
header
Unique identifier for the request. Include this when contacting support.Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

Body

application/json

Request schema for generating an access token using a client key.

key_id
string
required

API key ID from the Interhuman dashboard.

key_secret
string
required

API key secret from the Interhuman dashboard.

scopes
enum<string>[]
required

List of requested scopes. At least one scope must be provided.

Minimum array length: 1

Scopes define which endpoints the token can call.

Options:

  • interhumanai.upload for /v0/upload/analyze
  • interhumanai.stream for /v0/stream/analyze
Available options:
interhumanai.upload,
interhumanai.stream

Response

Successful Response

Response schema for a generated access token.

access_token
string
required

The generated access token.

expires_in
integer
required

Time in seconds until expiration. Usually 900s or 15 minutes.

scope
string
required

Space-separated list of granted scopes.

token_type
string
default:Bearer

Token type. Always Bearer.