curl
curl https://api.naga.ac/v1/account/keys \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"import requests
url = "https://api.naga.ac/v1/account/keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/account/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/account/keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"keys": [
{
"id": 42,
"name": "production",
"created_at": "2026-08-01T09:14:22",
"expires_at": null,
"is_enabled": true,
"credit_limit": 25
}
]
}{
"error": {
"type": "invalid_request_error",
"message": "Invalid provisioning key."
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}API Keys
List API keys
Returns every API key on the account, disabled and expired ones included. Requires a provisioning key.
GET
/
v1
/
account
/
keys
curl
curl https://api.naga.ac/v1/account/keys \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"import requests
url = "https://api.naga.ac/v1/account/keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/account/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/account/keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"keys": [
{
"id": 42,
"name": "production",
"created_at": "2026-08-01T09:14:22",
"expires_at": null,
"is_enabled": true,
"credit_limit": 25
}
]
}{
"error": {
"type": "invalid_request_error",
"message": "Invalid provisioning key."
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
An account provisioning key. Send it as Authorization: Bearer <key>. Provisioning keys manage the account and cannot reach a model.
Response
The account's API keys, newest first. No secret is among the fields.
The body of GET /v1/account/keys.
Every key on the account, newest first, disabled and expired ones included.
Hide child attributes
Hide child attributes
The key's id, which is the {key_id} the per-key routes take.
The label the key carries.
When the key was created: UTC to the second, without an offset.
When the key stops working, or null for one that never expires.
Whether the key works at all.
The key's own spending limit in credits, or null for none.