Skip to main content
GET
Get Text Styles

Overview

Fetch all text styles defined in the Pictory App. Text styles are predefined formatting presets that control the appearance of text in your videos, including font, size, color, weight, alignment, and other visual properties. These styles can be applied to captions, titles, headings, and body text in your video projects. Use this endpoint to retrieve available styles for video editing, branding customization, or to allow users to select from predefined text formatting options.
You need a valid API key to use this endpoint. Get your API key from the API Access page in your Pictory dashboard.

API Endpoint


Request Parameters

Headers

string
required
API key for authentication (starts with pictai_)

Response

Returns an array of text style objects, each containing a unique identifier and descriptive name.
array of objects
List of available text styles

Response Examples


Code Examples

Replace YOUR_API_KEY with your actual API key that starts with pictai_

Common Use Cases

1. List All Available Styles

Retrieve and display all text styles:

2. Search Styles by Name

Find styles matching specific criteria:

3. Create Style Selector for UI

Build a dropdown/selector component:

4. Cache Styles Locally

Cache styles to reduce API calls:

5. Group Styles by Category

Organize styles into logical categories:

Style Categories

Based on the returned styles, common categories include:

Usage Notes

Caching Recommended: Text styles rarely change. Cache the results locally to improve performance and reduce API calls.
Style IDs: Use the UUID id field when applying styles to video elements. Style names are for display purposes only.
Consistent Across Projects: The same text styles are available across all your video projects, ensuring brand consistency.

Best Practices

  1. Cache Styles: Fetch styles once and cache them locally. Text styles change infrequently.
  2. Use Style IDs: Always reference styles by their UUID id, not by name. Names may change, but IDs remain constant.
  3. Provide Search/Filter: In user interfaces, provide search or filter functionality to help users find specific styles quickly from the large list.
  4. Group by Category: Organize styles into logical categories (captions, headings, colors) for better user experience.
  5. Show Previews: If possible, display visual previews of text styles to help users make selections.
  6. Handle Missing Styles Gracefully: If a referenced style ID does not exist, fall back to a default style.
  7. Sort Alphabetically: Present styles in alphabetical order for easy browsing.
  8. Validate Style IDs: Before applying a style, verify the ID exists in the current list of available styles.