Create API key

You can create a temporary API key by sending a POST request to the temporary keys endpoint. Keys will not show in the platform. ## Body - `name` *string*: The name of the temporary API key. - `expiry_date` *string*: The expiry date of the temporary API key. It should be ISO format string, like `2025-03-15T01:19:33.263343Z` - `max_usage` *integer*: Number of times this key can be used for logging. -1 being default, means infinite times - `rate_limit` *integer*: Calls per minute. This is going to be overridden by the plan's rate limit. Default is `Null`. - `spending_limit` *float*: Spending with proxy. In US dollars Default is `Null`. - `is_test` *boolean*: Is this a test key or a prod key Default is `false`. ## Response <Warning> This is the only time the `api_key` will show, KEEP IT SOME WHERE SAFE </Warning> ```json { "id": "vcjRcdm8...", "api_key": "vcjRcdm8.5hSZiXrA698O6KAiWX5CJj8Zrbp0H6gV", // This is the only time this will show, KEEP IT SOME WHERE SAFE "prefix": "vcjRcdm8", "created": "2025-03-16T01:19:17.074170Z", "name": "Respan temporary key", "revoked": false, "expiry_date": "2025-03-15T01:19:33.263343Z", "key_usage": 0, "max_usage": -1, "last_used": "1970-01-01T00:00:00Z", "rate_limit": null, "spending_limit": null, "spending_in_period": 0.0, "is_test": false, "is_temporary": true } ```

Authentication

AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys

Request

This endpoint expects an object.
namestringOptional
The name of the temporary API key.
expiry_datestringOptional

The expiry date of the temporary API key. It should be ISO format string, like 2025-03-15T01:19:33.263343Z

max_usageintegerOptionalDefaults to -1

Number of times this key can be used for logging. -1 being default, means infinite times

rate_limitintegerOptional
Calls per minute. This is going to be overridden by the plan's rate limit. Default is Null.
spending_limitdoubleOptional
Spending with proxy. In US dollars Default is Null.
is_testbooleanOptional
Is this a test key or a prod key Default is false.

Response

Successful response for Create API key

Errors

401
Unauthorized Error