Inference API
Account
API key
/v1/api-key
Get information about an API key, including name, status, permissions and users who created or modified this key.
Response Body
aclsarray<string>A list of ACLs authorized with the API key, e.g. `"api-key:endpoint:*"`, `"api-key:model:*"`.
api_key_blockedbooleanIndicates whether the API key is blocked.
api_key_disabledbooleanIndicates whether the API key is disabled.
api_key_idstringID of the API key.
create_timestringCreation time of the API key in Unix timestamp.
modified_bystringUser ID of the user who last modified the API key.
modify_timestringLast modification time of the API key in Unix timestamp.
namestringThe name of the API key specified by user.
redacted_api_keystringThe redacted API key.
team_blockedbooleanIndicates whether the team that owns the API key.
team_idstringThe team ID of the team that owns the API key.
user_idstringUser ID the API key belongs to.
No parameters.{
"redacted_api_key": "xai-...b14o",
"user_id": "59fbe5f2-040b-46d5-8325-868bb8f23eb2",
"name": "My API Key",
"create_time": "2024-01-01T12:55:18.139305Z",
"modify_time": "2024-08-28T17:20:12.343321Z",
"modified_by": "3d38b4dc-4eb7-4785-ae26-c3fa8997ffc7",
"team_id": "5ea6f6bd-7815-4b8a-9135-28b2d7ba6722",
"acls": [
"api-key:model:*",
"api-key:endpoint:*"
],
"api_key_id": "ae1e1841-4326-4b36-a8a9-8a1a7237db11",
"team_blocked": false,
"api_key_blocked": false,
"api_key_disabled": false
}Tokenize text
/v1/tokenize-text
Tokenize text with the specified model
Request Body
Response Body
token_idsarray<object>A list of tokens.
{
"text": "Hello world!",
"model": "latest"
}{
"token_ids": [
{
"token_id": 13902,
"string_token": "Hello",
"token_bytes": [
72,
101,
108,
108,
111
]
},
{
"token_id": 1749,
"string_token": " world",
"token_bytes": [
32,
119,
111,
114,
108,
100
]
},
{
"token_id": 161,
"string_token": "!",
"token_bytes": [
33
]
}
]
}Last updated:September 14, 2026