Skip to main content
POST
Create Temporary Api Key

Authorizations

HAIQU_API_KEY
string
query
required

Body

application/json

A request for a temporary API key. Values above the maximums are lowered to them.

client
string
required

What the key is for, such as chatgpt.

Required string length: 1 - 50
label
string | null

A note to tell keys apart, such as the title of the notebook.

Maximum string length: 200
minutes
integer
default:30

How long the key lasts, at most 60 minutes. It is never extended.

Required range: x >= 1
credit_limit
integer
default:600

The most credits that the key's jobs may use, at most 3600.

Required range: x >= 1

Response

Successful Response

A new temporary API key, with the key itself, which is shown this one time only.

id
integer
required
prefix
string
required

The start of the key, to tell keys apart.

client
string
required
label
string | null
required
credit_limit
integer
required
created_at
string<date-time>
required
expires_at
string<date-time>
required
revoked_at
string<date-time> | null
required
key
string
required
credits_spent
number
default:0

The credits that the key's finished jobs have used. A job is charged when it ends.