Skip to content

Create an API key

POST
/v1/keys
import requests
resp = requests.post(
"https://api.ultimateteam.ai/v1/keys",
headers={"X-API-Key": "utk_live_YOUR_KEY"},
)
print(resp.json())

Mint a new API key and return the raw key material exactly once. Subsequent list/get calls never surface it.

X-API-Key
Any of:
string
Media typeapplication/json
CreateKeyRequest

Body for POST /v1/keys.

object
allowed_origins
Allowed Origins
Array<string>
expires_in_days
Any of:
integer
>= 1 <= 365
mode
ApiKeyMode

Which environment a public API key is scoped to.

string
default: live
Allowed values: live test
name
required
Name
string
>= 1 characters <= 255 characters
scopes
required
Scopes
Array<string>
>= 1 items

Successful Response

Media typeapplication/json
Response Create Key V1 Keys Post
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}