> ## 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 Fonts

> Retrieve all supported text fonts available for video generation in Pictory

## Overview

Fetch all supported text fonts available for video generation in the Pictory App. These fonts can be applied to text elements in your video storyboard, including captions, titles, headings, and body text.

Use this endpoint to retrieve available fonts for video editing, text customization, or to allow users to select from supported font options when creating or editing video content.

<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.
</Note>

***

## API Endpoint

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

***

## Request Parameters

### Headers

<ParamField header="Authorization" type="string" required>
  API key for authentication (starts with `pictai_`)

  ```
  Authorization: YOUR_API_KEY
  ```
</ParamField>

***

## Response

Returns an array of font names as strings. Each font name represents a supported typeface that can be used in video text elements.

<ResponseField name="Array" type="array of strings">
  List of available font names
</ResponseField>

### Response Examples

<ResponseExample>
  ```json 200 - Success theme={null}
  [
    "Arial",
    "Averia Libre",
    "Calibri",
    "Caveat",
    "Courier Prime",
    "Dancing Script",
    "Grandstander",
    "Helvetica",
    "Helvetica Neue",
    "Josefin Sans",
    "Lato",
    "Merriweather",
    "Montserrat",
    "Moon dance",
    "Noto Sans",
    "Open Sans",
    "Poppins",
    "ProximaNova",
    "Quicksand",
    "Roboto",
    "Rokkitt",
    "Rowdies",
    "Source Sans Pro",
    "Space mono",
    "Ubuntu"
  ]
  ```

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

  ```json 500 - Internal Server Error theme={null}
  {
    "error": {
      "code": "INTERNAL_ERROR",
      "message": "An unexpected error occurred"
    }
  }
  ```
</ResponseExample>

***

## Code Examples

<Tip>
  Replace `YOUR_API_KEY` with your actual API key that starts with `pictai_`
</Tip>

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts' \
    --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/video/storyboard/fonts"
  headers = {
      "Authorization": "YOUR_API_KEY",
      "accept": "application/json"
  }

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

  print(f"Total fonts available: {len(fonts)}\n")

  # Display all fonts
  for i, font in enumerate(fonts, 1):
      print(f"{i}. {font}")
  ```

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

  const fonts = await response.json();

  console.log(`Total fonts available: ${fonts.length}\n`);

  // Display all fonts
  fonts.forEach((font, index) => {
    console.log(`${index + 1}. ${font}`);
  });
  ```

  ```php PHP theme={null}
  <?php
  // Replace 'YOUR_API_KEY' with your actual API key

  function getFonts($apiKey) {
      $url = 'https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts';

      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, [
          'Authorization: ' . $apiKey,
          '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);
      }

      return json_decode($response, true);
  }

  // Usage
  try {
      $fonts = getFonts('YOUR_API_KEY');

      echo "Total fonts available: " . count($fonts) . "\n\n";

      // Display all fonts
      foreach ($fonts as $index => $font) {
          echo ($index + 1) . ". $font\n";
      }
  } catch (Exception $e) {
      echo "Error: " . $e->getMessage() . "\n";
  }
  ?>
  ```

  ```go Go theme={null}
  // Replace "YOUR_API_KEY" with your actual API key

  package main

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

  func getFonts(apiKey string) ([]string, error) {
      url := "https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts"

      req, err := http.NewRequest("GET", url, nil)
      if err != nil {
          return nil, err
      }

      req.Header.Set("Authorization", apiKey)
      req.Header.Set("accept", "application/json")

      client := &http.Client{}
      resp, err := client.Do(req)
      if err != nil {
          return nil, err
      }
      defer resp.Body.Close()

      body, err := io.ReadAll(resp.Body)
      if err != nil {
          return nil, err
      }

      if resp.StatusCode != http.StatusOK {
          return nil, fmt.Errorf("request failed (status %d): %s", resp.StatusCode, string(body))
      }

      var fonts []string
      if err := json.Unmarshal(body, &fonts); err != nil {
          return nil, err
      }

      return fonts, nil
  }

  // Usage
  func main() {
      fonts, err := getFonts("YOUR_API_KEY")
      if err != nil {
          panic(err)
      }

      fmt.Printf("Total fonts available: %d\n\n", len(fonts))

      // Display all fonts
      for i, font := range fonts {
          fmt.Printf("%d. %s\n", i+1, font)
      }
  }
  ```
</CodeGroup>

***

## Common Use Cases

### 1. List All Available Fonts

Retrieve and display all supported fonts:

```python theme={null}
import requests

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

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

print(f"Total fonts: {len(fonts)}\n")

# Display in columns
for i in range(0, len(fonts), 3):
    row = fonts[i:i+3]
    print("  ".join(f"{font:<20}" for font in row))
```

### 2. Create Font Selector for UI

Build a dropdown/selector component:

```python theme={null}
import requests

def get_fonts_for_selector(api_key):
    """
    Get fonts formatted for a UI selector.

    Args:
        api_key: Your API key

    Returns:
        List of selector options
    """
    url = "https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts"
    headers = {
        "Authorization": api_key,
        "accept": "application/json"
    }

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

    # Format for UI selector
    selector_options = [
        {
            "value": font,
            "label": font
        }
        for font in sorted(fonts)
    ]

    return selector_options

# Usage
options = get_fonts_for_selector("YOUR_API_KEY")

print(f"Font options: {len(options)}\n")

# Example output
for option in options[:10]:
    print(f"  {option['label']}")
```

### 3. Categorize Fonts by Type

Organize fonts into categories based on their characteristics:

```python theme={null}
import requests

def categorize_fonts(api_key):
    """
    Categorize fonts based on their characteristics.

    Args:
        api_key: Your API key

    Returns:
        Dictionary with categorized fonts
    """
    url = "https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts"
    headers = {
        "Authorization": api_key,
        "accept": "application/json"
    }

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

    categories = {
        'Sans-Serif': [],
        'Serif': [],
        'Monospace': [],
        'Script/Handwriting': [],
        'Display/Decorative': [],
        'Other': []
    }

    # Categorize fonts based on name patterns
    sans_serif = ['Arial', 'Helvetica', 'Calibri', 'Lato', 'Open Sans',
                  'Poppins', 'Roboto', 'Noto Sans', 'Source Sans Pro',
                  'Josefin Sans', 'Ubuntu', 'ProximaNova', 'Quicksand']

    serif = ['Merriweather', 'Rokkitt']

    monospace = ['Courier Prime', 'Space mono']

    script = ['Dancing Script', 'Caveat', 'Moon dance']

    display = ['Grandstander', 'Rowdies', 'Averia Libre', 'Montserrat']

    for font in fonts:
        if font in sans_serif:
            categories['Sans-Serif'].append(font)
        elif font in serif:
            categories['Serif'].append(font)
        elif font in monospace:
            categories['Monospace'].append(font)
        elif font in script:
            categories['Script/Handwriting'].append(font)
        elif font in display:
            categories['Display/Decorative'].append(font)
        else:
            categories['Other'].append(font)

    return categories

# Usage
categories = categorize_fonts("YOUR_API_KEY")

for category, fonts in categories.items():
    if fonts:
        print(f"\n{category} ({len(fonts)} fonts):")
        for font in fonts:
            print(f"  - {font}")
```

### 4. Search Fonts by Name

Find fonts matching specific criteria:

```python theme={null}
import requests

def search_fonts(api_key, search_term):
    """
    Search for fonts by name.

    Args:
        api_key: Your API key
        search_term: Text to search for in font names

    Returns:
        List of matching font names
    """
    url = "https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts"
    headers = {
        "Authorization": api_key,
        "accept": "application/json"
    }

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

    # Case-insensitive search
    search_term_lower = search_term.lower()
    matches = [
        font for font in fonts
        if search_term_lower in font.lower()
    ]

    return matches

# Usage - Find all fonts containing "sans"
sans_fonts = search_fonts("YOUR_API_KEY", "sans")

print(f"Found {len(sans_fonts)} fonts containing 'sans':")
for font in sans_fonts:
    print(f"- {font}")

# Find monospace fonts
mono_fonts = search_fonts("YOUR_API_KEY", "mono")
print(f"\nFound {len(mono_fonts)} monospace fonts:")
for font in mono_fonts:
    print(f"- {font}")
```

### 5. Validate Font Names

Check if a font name is supported:

```python theme={null}
import requests

def validate_font(api_key, font_name):
    """
    Validate if a font name is supported.

    Args:
        api_key: Your API key
        font_name: The font name to validate

    Returns:
        Tuple of (is_valid, exact_match or None)
    """
    url = "https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts"
    headers = {
        "Authorization": api_key,
        "accept": "application/json"
    }

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

    # Exact match (case-sensitive)
    if font_name in fonts:
        return True, font_name

    # Case-insensitive match
    for font in fonts:
        if font.lower() == font_name.lower():
            return True, font

    return False, None

# Usage
test_fonts = ["Arial", "arial", "Roboto", "Times New Roman", "Poppins"]

for font in test_fonts:
    is_valid, exact_match = validate_font("YOUR_API_KEY", font)
    if is_valid:
        print(f"✓ '{font}' is valid (exact: '{exact_match}')")
    else:
        print(f"✗ '{font}' is not supported")
```

***

## Font Categories

The supported fonts can be grouped into the following categories:

| Category               | Fonts                                                                                                                                 | Use Case                                            |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| **Sans-Serif**         | Arial, Helvetica, Calibri, Lato, Open Sans, Poppins, Roboto, Noto Sans, Source Sans Pro, Josefin Sans, Ubuntu, ProximaNova, Quicksand | Modern, clean text; body copy; UI elements          |
| **Serif**              | Merriweather, Rokkitt                                                                                                                 | Traditional, formal text; headings; elegant designs |
| **Monospace**          | Courier Prime, Space mono                                                                                                             | Code snippets; technical content; typewriter effect |
| **Script/Handwriting** | Dancing Script, Caveat, Moon dance                                                                                                    | Personal touch; invitations; creative designs       |
| **Display/Decorative** | Grandstander, Rowdies, Averia Libre, Montserrat                                                                                       | Headlines; attention-grabbing text; branding        |

***

## Font Characteristics

### Sans-Serif Fonts

**Best for:** Modern designs, body text, readability on screens

* **Arial** - Classic, widely supported
* **Helvetica / Helvetica Neue** - Professional, clean
* **Roboto** - Modern, geometric
* **Open Sans** - Friendly, optimized for web
* **Lato** - Warm, contemporary
* **Poppins** - Geometric, playful
* **Montserrat** - Urban, sophisticated

### Serif Fonts

**Best for:** Traditional designs, printed materials, elegance

* **Merriweather** - Designed for screens, highly readable
* **Rokkitt** - Geometric slab serif, distinctive

### Monospace Fonts

**Best for:** Code, technical documentation, retro designs

* **Courier Prime** - Classic typewriter style
* **Space mono** - Quirky, geometric

### Script & Handwriting Fonts

**Best for:** Personal touch, creative projects, invitations

* **Dancing Script** - Elegant, flowing
* **Caveat** - Casual, handwritten
* **Moon dance** - Playful, decorative

### Display & Decorative Fonts

**Best for:** Headlines, logos, attention-grabbing text

* **Grandstander** - Bold, energetic
* **Rowdies** - Fun, rounded
* **Averia Libre** - Artistic, unique

***

## Usage Notes

<Tip>
  **Font Names are Case-Sensitive**: When applying fonts to video elements, use the exact font name as returned by this endpoint, including capitalization.
</Tip>

<Note>
  **Caching Recommended**: The list of supported fonts changes infrequently. Cache the results locally to improve performance and reduce API calls.
</Note>

<Note>
  **Fallback Fonts**: If a specified font is unavailable, the system will fall back to a default font (typically Arial or Roboto).
</Note>

***

## Best Practices

1. **Cache Font List**: Fetch fonts once and cache them locally. The list changes infrequently.

2. **Use Exact Names**: Always use the exact font name as returned by the API, including capitalization and spacing.

3. **Provide Font Preview**: In user interfaces, display visual previews of fonts in their actual typeface to help users make selections.

4. **Group by Category**: Organize fonts into logical categories (Sans-Serif, Serif, Script, etc.) for better user experience.

5. **Sort Alphabetically**: Present fonts in alphabetical order for easy browsing.

6. **Validate Font Names**: Before applying a font to a video element, verify the name exists in the current list of supported fonts.

7. **Consider Readability**: Choose fonts appropriate for the video context:
   * **Captions/Subtitles**: Sans-serif fonts (Arial, Roboto, Open Sans)
   * **Headlines**: Display or bold sans-serif fonts (Montserrat, Poppins)
   * **Formal Content**: Serif fonts (Merriweather)
   * **Creative/Personal**: Script fonts (Dancing Script, Caveat)

8. **Test Font Sizes**: Different fonts have different optical sizes. Test readability at various sizes.

9. **Limit Font Variety**: Use 2-3 fonts maximum per video for visual consistency.

10. **Accessibility**: Ensure sufficient contrast between text and background. Avoid overly decorative fonts for important information.

***

## Integration with Video Storyboard

Apply fonts when creating or updating video storyboard elements:

```python theme={null}
import requests

def apply_font_to_text_element(api_key, project_id, font_name):
    """
    Example of applying a font to a text element in a video storyboard.

    Args:
        api_key: Your API key
        project_id: The project ID
        font_name: The font to apply

    Note: This is a conceptual example. The actual implementation
    depends on the storyboard update endpoint structure.
    """
    # First, validate the font exists
    fonts_url = "https://api.pictory.ai/pictoryapis/v1/video/storyboard/fonts"
    headers = {
        "Authorization": api_key,
        "accept": "application/json"
    }

    fonts_response = requests.get(fonts_url, headers=headers)
    fonts = fonts_response.json()

    # Check if font exists
    if font_name not in fonts:
        # Try case-insensitive match
        font_match = next((f for f in fonts if f.lower() == font_name.lower()), None)
        if font_match:
            font_name = font_match
        else:
            raise ValueError(f"Font '{font_name}' not supported")

    # Apply font to storyboard element
    print(f"Applying font '{font_name}' to project {project_id}")
    # Implementation depends on storyboard update endpoint

# Usage
apply_font_to_text_element(
    "YOUR_API_KEY",
    "project-123",
    "Poppins"
)
```

***

## Popular Font Combinations

### Professional & Clean

* **Heading:** Montserrat (Bold)
* **Body:** Open Sans (Regular)
* **Caption:** Roboto (Light)

### Modern & Friendly

* **Heading:** Poppins (SemiBold)
* **Body:** Lato (Regular)
* **Caption:** Lato (Light)

### Classic & Elegant

* **Heading:** Merriweather (Bold)
* **Body:** Lato (Regular)
* **Caption:** Lato (Italic)

### Creative & Playful

* **Heading:** Grandstander (Bold)
* **Body:** Quicksand (Regular)
* **Caption:** Quicksand (Light)

### Technical & Modern

* **Heading:** Roboto (Bold)
* **Body:** Roboto (Regular)
* **Code:** Courier Prime (Regular)

***

## Related Endpoints

* [Get Text Styles](get-text-styles) - Retrieve text styling presets
* [Get Video Brands](get-video-brands) - Retrieve video brand configurations
* [Video Storyboard](video-storyboard) - Create and manage video storyboards
