For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTCreate an API key
      • GETList API keys
      • GETRetrieve an API key
      • PATCHUpdate an API key
      • DELDelete an API key
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceTemporary API Keys

Create an API key

POST
https://api.respan.ai/api/temporary-keys/
POST
/api/temporary-keys/
$curl -X POST https://api.respan.ai/api/temporary-keys/ \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
3 "name": "Temporary Access Key",
4 "prefix": "tmp_",
5 "is_test": false,
6 "expiry_date": "2024-12-31T23:59:59Z",
7 "max_usage": -1,
8 "rate_limit": 100,
9 "spending_limit": 500,
10 "created_at": "2024-06-01T12:00:00Z",
11 "api_key": "vcjRcdm8.5hSZiXrA698O6KAiWX5CJj8Zrbp0H6gV",
12 "key_usage": 0
13}
Create a new API key.
Was this page helpful?
Previous

List API keys

Next
Built with

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Request

This endpoint expects an object.
namestringOptional
Key name.
expiry_datedatetimeOptional

Expiry date (ISO 8601).

max_usageintegerOptionalDefaults to -1

Max usage count. -1 = unlimited.

rate_limitintegerOptional
Calls per minute. Overridden by plan limit.
spending_limitdoubleOptional
Spending limit in USD for gateway usage.
is_testbooleanOptionalDefaults to false

Test key (true) or production key (false).

Response

Created API key.
idstring
API key ID.
namestring
Key name.
prefixstring
Key prefix.
is_testboolean
Test or production key.
expiry_datedatetime
Expiry date.
max_usageinteger

Max usage count. -1 = unlimited.

rate_limitinteger
Calls per minute.
spending_limitdouble
Spending limit in USD.
created_atdatetime
api_keystring

The API key value. Only returned on creation - store it securely.

key_usageinteger
Number of times this key has been used.

Errors

401
Unauthorized Error