Usage
The calling key's own usage: its requests and the credits they used.
Return requests, success rate, durations and credits for this key.
HTTPBearerAuthorizationBearer <token>since?|Only requests created at or after this time (ISO 8601 with timezone).
until?|Only requests created before this time (ISO 8601 with timezone).
Successful Response
application/json- response
Usage over a window, for one key or for every key in scope.
workspace_id*Workspace IdWorkspace the usage belongs to.
uuidapi_key_id*|Key the summary is limited to; null when it covers every key in scope.
since*|Inclusive window start; null for unbounded.
until*|Exclusive window end; null for unbounded.
requests*Generation requests by outcome.
success_rate*|Percent (0-100) of finished requests that completed; null until one finishes.
avg_duration_seconds*|Mean seconds from acceptance to finish over finished requests.
credits_consumed*Credits ConsumedTotal credits charged in the window.
by_feature*array<>Credits by feature, highest first.
by_key*array<>Usage per key, most credits first.
curl -X GET 'https://api.presentations.ai/api/v1/usage'{ "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9", "api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd", "since": "2019-08-24T14:15:22Z", "until": "2019-08-24T14:15:22Z", "requests": { "total": 0, "completed": 0, "failed": 0, "in_progress": 0 }, "success_rate": 0, "avg_duration_seconds": 0, "credits_consumed": 0, "by_feature": [ { "feature": "string", "credits": 0, "uses": 0 } ], "by_key": [ { "api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd", "name": "string", "prefix": "string", "requests": 0, "credits_consumed": 0 } ]}List the deck-generation requests this key made, newest first.
HTTPBearerAuthorizationBearer <token>since?|Only requests created at or after this time (ISO 8601 with timezone).
until?|Only requests created before this time (ISO 8601 with timezone).
status?|Only requests in this state.
page?PagePage number, starting at 1.
1 <= value1limit?LimitItems per page.
1 <= value <= 20050Successful Response
application/json- response
data*array<>Items on this page.
page*Page1-based page number returned.
limit*LimitMaximum items per page.
total*TotalItems matching the filters across all pages.
curl -X GET 'https://api.presentations.ai/api/v1/usage/requests'{ "data": [ { "task_id": "736fde4d-9029-4915-8189-01353d6982cb", "request_id": "string", "api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd", "deck_id": "9a69d1f4-7dd8-49b6-bc74-49de70b854da", "status": "CREATED", "stage": "QUEUED", "created_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "duration_seconds": 0, "credits_consumed": 0, "error": "string" } ], "page": 0, "limit": 0, "total": 0}