> ## 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 Smart Layouts

> Retrieve all smart layout templates available for video creation

## Overview

Fetch all smart layout templates available in your Pictory account. Smart layouts are pre-designed visual templates that define how text, visuals, and other elements are arranged in your video scenes. They provide professional styling with consistent positioning, animations, and visual effects.

Use this endpoint to retrieve available smart layouts for video creation, allowing users to select from pre-defined layout options that match their content style.

> [!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.

***

## What Are Smart Layouts?

Smart layouts are visual templates that control:

> [card] Text Positioning
>
> Where subtitles and captions appear on screen

> [card] Visual Arrangement
>
> How background media is displayed and cropped

> [card] Animations
>
> Entry, exit, and emphasis animations for elements

> [card] Styling
>
> Colors, fonts, and visual effects applied to scenes

***

## API Endpoint

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

***

## Request Parameters

### Headers

**Authorization** `string` *required*

API key for authentication

```
Authorization: YOUR_API_KEY
```

***

## Response

Returns an object containing an array of smart layout templates.

**items** `array of objects`

List of available smart layout templates

**layout object**

**templateId** `string` *required*

Unique identifier for the smart layout. Use this value for the `smartLayoutId` parameter when creating videos.

**templateName** `string` *required*

Descriptive name of the smart layout (e.g., "Modern minimalist", "Kinetic", "Chic")

**schemaVersion** `string` *required*

Version of the layout schema (e.g., "v3")

### Response Examples

```json 200 - Success theme={null}
{
  "items": [
    {
      "templateId": "202507141030549677ylq8k8gu44vy1y",
      "templateName": "Modern minimalist",
      "schemaVersion": "v3"
    },
    {
      "templateId": "20250813042630669e658e159aa60455692c1dad5473adhg7",
      "templateName": "Kinetic",
      "schemaVersion": "v3"
    },
    {
      "templateId": "20250813042630669e658e159aa60455692c1dad5473adaa3",
      "templateName": "Chic",
      "schemaVersion": "v3"
    },
    {
      "templateId": "20250813042630669e658e159aa60455692c1dad5473adcf7",
      "templateName": "Wanderlust",
      "schemaVersion": "v3"
    },
    {
      "templateId": "20250813042630669e658e159aa60455692c1dad5473adtd3",
      "templateName": "Bulletin",
      "schemaVersion": "v3"
    }
  ]
}
```

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

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

***

## Default Smart Layouts

The following smart layouts are available by default:

| Layout Name | Style | Best Used For |
| - | - | - |
| **Modern minimalist** | Clean, simple design with subtle animations | Professional content, corporate videos, tutorials |
| **Kinetic** | Dynamic, energetic with bold movements | Social media content, promotional videos, engaging clips |
| **Chic** | Elegant, sophisticated styling | Fashion, lifestyle, premium brand content |
| **Wanderlust** | Travel-inspired, adventurous feel | Travel content, adventure videos, outdoor themes |
| **Bulletin** | News-style, informative layout | News updates, announcements, educational content |

> [!TIP]
>
> You can also create custom smart layouts in the Pictory App. Custom layouts will appear in your API response alongside the default layouts.

***

## Code Examples

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

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

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

print(f"Total smart layouts available: {len(data['items'])}\n")

# Display all layouts
for layout in data['items']:
    print(f"- {layout['templateName']} (ID: {layout['templateId']})")
```

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

const data = await response.json();

console.log(`Total smart layouts available: ${data.items.length}\n`);

// Display all layouts
data.items.forEach(layout => {
  console.log(`- ${layout.templateName} (ID: ${layout.templateId})`);
});
```

```php PHP theme={null}
<?php
function getSmartLayouts($apiKey) {
    $url = 'https://api.pictory.ai/pictoryapis/v1/smartlayouts';

    $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 {
    $data = getSmartLayouts('YOUR_API_KEY');

    echo "Total smart layouts available: " . count($data['items']) . "\n\n";

    // Display all layouts
    foreach ($data['items'] as $layout) {
        echo "- {$layout['templateName']} (ID: {$layout['templateId']})\n";
    }
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
?>
```

***

## Using Smart Layouts in Video Creation

Once you have the layout ID, use it with the `smartLayoutId` parameter when creating videos:

### Using Layout ID

```javascript theme={null}
const response = await fetch('https://api.pictory.ai/pictoryapis/v2/video/storyboard/render', {
  method: 'POST',
  headers: {
    'Authorization': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    videoName: 'my_video',
    smartLayoutId: '202507141030549677ylq8k8gu44vy1y', // Modern minimalist
    scenes: [{
      story: 'Your video content here',
      createSceneOnEndOfSentence: true
    }]
  })
});
```

### Using Layout Name

Alternatively, you can use the `smartLayoutName` parameter with the exact template name:

```javascript theme={null}
const response = await fetch('https://api.pictory.ai/pictoryapis/v2/video/storyboard/render', {
  method: 'POST',
  headers: {
    'Authorization': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    videoName: 'my_video',
    smartLayoutName: 'modern minimalist', // Case-insensitive
    scenes: [{
      story: 'Your video content here',
      createSceneOnEndOfSentence: true
    }]
  })
});
```

> [!WARNING]
>
> You cannot use both `smartLayoutId` and `smartLayoutName` in the same request. Choose one method to specify your layout.

***

## Error Handling

> [accordion] 401 - Unauthorized
>
> ```json theme={null}
> {
>   "message": "Unauthorized"
> }
> ```
>
> **Solution:** Check your API key is valid and correctly formatted in the Authorization header.

> [accordion] 500 - Internal Server Error
>
> ```json theme={null}
> {
>   "error": {
>     "code": "INTERNAL_ERROR",
>     "message": "An unexpected error occurred"
>   }
> }
> ```
>
> **Solution:** Retry the request. If the issue persists, contact support.

***

## Related APIs

> [card] [Create Storyboard Preview](https://docs.pictory.ai/api-reference/videos/create-storyboard-preview.md)
>
> Use smart layouts when creating video previews

> [card] [Render Storyboard Video](https://docs.pictory.ai/api-reference/videos/render-storyboard-video.md)
>
> Apply smart layouts to rendered videos

> [card] [Get Text Styles](https://docs.pictory.ai/api-reference/branding/get-text-styles.md)
>
> Customize subtitle styling within layouts

> [card] [Get Video Brands](https://docs.pictory.ai/api-reference/branding/get-video-brands.md)
>
> Combine layouts with brand settings


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