Skip to main content
POST
/
api
/
v3
/
keys
Create API key
curl --request POST \
  --url https://api.lighton.ai/api/v3/keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "key": "<string>",
  "prefix": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://developers.lighton.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

Reject any request fields not declared on the serializer.

name
string
required
Maximum string length: 250
expires_at
string<date-time> | null
required

Expiration datetime for the API key. Set to a future datetime to expire the key at that time, or null to create a key that never expires.

Response

API key created. The key field contains the full key value — save it now, it will not be shown again.

id
string
required
name
string
required
key
string
required
prefix
string
required
created_at
string<date-time>
required
expires_at
string<date-time> | null
required