> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Current Quota

> Retrieve the current usage and limits for the four core quota types on your subscription

## Overview

Retrieve a real-time snapshot of the quotas associated with your Pictory subscription. The response shows how much of each quota you have used so far in the current billing term and how much is allowed by your plan.

The endpoint reports the following four metrics:

* **Video minutes** rendered through Pictory's video generation pipeline
* **Transcription minutes** consumed by transcription jobs
* **ElevenLabs VoiceOver minutes** used for AI text-to-speech
* **AI credits** consumed by generative AI features such as AI avatars, text-to-image, and AI video generation

Use this endpoint when you need to display a usage summary in your application, gate a feature based on remaining quota, or verify that a subscription has capacity before launching a long-running job.

> [!NOTE]
>
> You need a valid API key to use this endpoint. Get your API key from the [API Access page](https://app.pictory.ai/api-access) in your Pictory dashboard.

***

## API Endpoint

```http theme={null}
GET https://api.pictory.ai/pictoryapis/v1/quota
```

***

## Request Parameters

### Headers

**Authorization** `string` *required*

API key for authentication (starts with `pictai_`)

```
Authorization: YOUR_API_KEY
```

This endpoint does not accept any path, query, or body parameters. The subscription is identified from the API key.

***

## Response

Returns an object containing four usage entries. Every entry has the same shape: `used` reports the amount consumed in the current billing term and `limit` reports the maximum allowed by the plan.

**videoMinutes** `object` *required*

Video minutes rendered in the current billing term.

**properties**

**used** `integer`

Number of video minutes already consumed in the current billing term.

**limit** `integer`

Maximum number of video minutes allowed by your plan in one billing term.

**transcriptionMinutes** `object` *required*

Transcription minutes consumed in the current billing term.

**properties**

**used** `integer`

Number of transcription minutes already consumed.

**limit** `integer`

Maximum number of transcription minutes allowed by your plan.

**elevenLabsVoiceOverMinutes** `object` *required*

ElevenLabs AI voice-over minutes consumed in the current billing term.

**properties**

**used** `integer`

Number of ElevenLabs voice-over minutes already consumed.

**limit** `integer`

Maximum number of ElevenLabs voice-over minutes allowed by your plan.

**aiCredits** `object` *required*

AI credits consumed in the current billing term. AI credits power generative features such as AI avatars, text-to-image, and AI video generation.

**properties**

**used** `integer`

Number of AI credits already consumed.

**limit** `integer`

Total AI credit allowance for your subscription, including any add-on or promotional credits.

### Response Examples

```json 200 - Success theme={null}
{
  "videoMinutes":               { "used": 98,  "limit": 14400 },
  "transcriptionMinutes":       { "used": 0,   "limit": 14400 },
  "elevenLabsVoiceOverMinutes": { "used": 33,  "limit": 480 },
  "aiCredits":                  { "used": 690, "limit": 22000 }
}
```

```json 400 - Bad Request theme={null}
{
  "code": "UNAUTHORIZED",
  "message": "Missing subscription identity."
}
```

```json 401 - Unauthorized theme={null}
{
  "message": "Unauthorized"
}
```

```text 404 - Subscription Not Found theme={null}
(empty response body)
```

```json 500 - Internal Server Error theme={null}
{
  "code": "BAD_CONFIGURATION",
  "message": "An unexpected error occurred while processing the request"
}
```

***

## Code Examples

> [!TIP]
>
> Replace `YOUR_API_KEY` with your actual API key that starts with `pictai_`

```bash cURL theme={null}
curl --request GET \
  --url 'https://api.pictory.ai/pictoryapis/v1/quota' \
  --header 'Authorization: YOUR_API_KEY' \
  --header 'accept: application/json' | python -m json.tool
```

```python Python theme={null}
import requests

url = "https://api.pictory.ai/pictoryapis/v1/quota"
headers = {
    "Authorization": "YOUR_API_KEY",
    "accept": "application/json"
}

response = requests.get(url, headers=headers)
quota = response.json()

print(f"Video Minutes: {quota['videoMinutes']['used']}/{quota['videoMinutes']['limit']}")
print(f"Transcription: {quota['transcriptionMinutes']['used']}/{quota['transcriptionMinutes']['limit']}")
print(f"ElevenLabs VO: {quota['elevenLabsVoiceOverMinutes']['used']}/{quota['elevenLabsVoiceOverMinutes']['limit']}")
print(f"AI Credits:    {quota['aiCredits']['used']}/{quota['aiCredits']['limit']}")
```

```javascript JavaScript / Node.js theme={null}
const response = await fetch(
  "https://api.pictory.ai/pictoryapis/v1/quota",
  {
    method: "GET",
    headers: {
      Authorization: "YOUR_API_KEY",
      accept: "application/json",
    },
  }
);

const quota = await response.json();

console.log(`Video Minutes: ${quota.videoMinutes.used}/${quota.videoMinutes.limit}`);
console.log(`Transcription: ${quota.transcriptionMinutes.used}/${quota.transcriptionMinutes.limit}`);
console.log(`ElevenLabs VO: ${quota.elevenLabsVoiceOverMinutes.used}/${quota.elevenLabsVoiceOverMinutes.limit}`);
console.log(`AI Credits:    ${quota.aiCredits.used}/${quota.aiCredits.limit}`);
```

```php PHP theme={null}
<?php

$url = 'https://api.pictory.ai/pictoryapis/v1/quota';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: YOUR_API_KEY',
    'accept: application/json'
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode !== 200) {
    throw new Exception('Request failed with status ' . $httpCode);
}

$quota = json_decode($response, true);

echo "Video Minutes: {$quota['videoMinutes']['used']}/{$quota['videoMinutes']['limit']}\n";
echo "Transcription: {$quota['transcriptionMinutes']['used']}/{$quota['transcriptionMinutes']['limit']}\n";
echo "ElevenLabs VO: {$quota['elevenLabsVoiceOverMinutes']['used']}/{$quota['elevenLabsVoiceOverMinutes']['limit']}\n";
echo "AI Credits:    {$quota['aiCredits']['used']}/{$quota['aiCredits']['limit']}\n";
?>
```

```go Go theme={null}
package main

import (
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

type QuotaEntry struct {
    Used  int `json:"used"`
    Limit int `json:"limit"`
}

type Quota struct {
    VideoMinutes               QuotaEntry `json:"videoMinutes"`
    TranscriptionMinutes       QuotaEntry `json:"transcriptionMinutes"`
    ElevenLabsVoiceOverMinutes QuotaEntry `json:"elevenLabsVoiceOverMinutes"`
    AICredits                  QuotaEntry `json:"aiCredits"`
}

func main() {
    req, _ := http.NewRequest("GET", "https://api.pictory.ai/pictoryapis/v1/quota", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    req.Header.Set("accept", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    var quota Quota
    json.Unmarshal(body, &quota)

    fmt.Printf("Video Minutes: %d/%d\n", quota.VideoMinutes.Used, quota.VideoMinutes.Limit)
    fmt.Printf("Transcription: %d/%d\n", quota.TranscriptionMinutes.Used, quota.TranscriptionMinutes.Limit)
    fmt.Printf("ElevenLabs VO: %d/%d\n", quota.ElevenLabsVoiceOverMinutes.Used, quota.ElevenLabsVoiceOverMinutes.Limit)
    fmt.Printf("AI Credits:    %d/%d\n", quota.AICredits.Used, quota.AICredits.Limit)
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.