curl
curl https://api.naga.ac/v1/account/keys/42 \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"import requests
url = "https://api.naga.ac/v1/account/keys/{key_id}"
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/{key_id}', 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/{key_id}"
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))
}{
"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": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"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
Get an API key
Returns one API key of the account, without its secret. Requires a provisioning key.
GET
/
v1
/
account
/
keys
/
{key_id}
curl
curl https://api.naga.ac/v1/account/keys/42 \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"import requests
url = "https://api.naga.ac/v1/account/keys/{key_id}"
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/{key_id}', 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/{key_id}"
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))
}{
"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": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"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.
Path Parameters
The key's id, as the listing reports it.
Response
The key, without its secret.
One API key of the account, without its secret.
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.