Account & Usage
List usage
List settled account usage newest first, across all keys. Records contain billing metadata, never prompts or generated content.
GET
/
usage
List usage
curl --request GET \
--url https://api.nomask.ai/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nomask.ai/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nomask.ai/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"request_id": "req_example",
"model": "your-text-model-id",
"model_type": "text",
"image_count": 0,
"reference_images": 0,
"image_resolution": null,
"image_format": null,
"pricing_type": null,
"usd_per_image": null,
"prompt_tokens": 14,
"completion_tokens": 19,
"usd_cost": 0.0001,
"streamed": false,
"tokens_estimated": false,
"latency_ms": 912,
"api_key": {
"id": 3,
"name": "production"
},
"created": 1793617200
}
],
"page": 1,
"per_page": 20,
"total": 1,
"has_more": false
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"message": "<string>",
"errors": {}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Create a NoMask API key at https://nomask.ai/api/keys. Keep it private; enter only your own key when sending a request.
Query Parameters
Page number.
Required range:
x >= 1Records per page; the server clamps the requested value to 1–100.
Required range:
1 <= x <= 100Filter to one key in your account.
Filter by exact public model ID.
Maximum string length:
150Filter to text or image requests.
Available options:
text, image ⌘I
List usage
curl --request GET \
--url https://api.nomask.ai/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nomask.ai/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nomask.ai/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"request_id": "req_example",
"model": "your-text-model-id",
"model_type": "text",
"image_count": 0,
"reference_images": 0,
"image_resolution": null,
"image_format": null,
"pricing_type": null,
"usd_per_image": null,
"prompt_tokens": 14,
"completion_tokens": 19,
"usd_cost": 0.0001,
"streamed": false,
"tokens_estimated": false,
"latency_ms": 912,
"api_key": {
"id": 3,
"name": "production"
},
"created": 1793617200
}
],
"page": 1,
"per_page": 20,
"total": 1,
"has_more": false
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"message": "<string>",
"errors": {}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}