Presentations.AI

Usage

The calling key's own usage: its requests and the credits they used.

Get Usage

GET
/usage

Return requests, success rate, durations and credits for this key.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

since?|

Only requests created at or after this time (ISO 8601 with timezone).

until?|

Only requests created before this time (ISO 8601 with timezone).

Response Body

Successful Response

application/json
  1. response

Usage over a window, for one key or for every key in scope.

workspace_id*Workspace Id

Workspace the usage belongs to.

Formatuuid
api_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 Consumed

Total 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 Usage Requests

GET
/usage/requests

List the deck-generation requests this key made, newest first.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

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?Page

Page number, starting at 1.

Range1 <= value
Default1
limit?Limit

Items per page.

Range1 <= value <= 200
Default50

Response Body

Successful Response

application/json
  1. response
data*array<>

Items on this page.

page*Page

1-based page number returned.

limit*Limit

Maximum items per page.

total*Total

Items 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}