# Pictory Integration via LowCodeAPI

**Last Updated**: January 05, 2025

## Overview
AI video generation platform for creating videos from text, images, and scripts

**Categories:**
- {'id': 'video-generation', 'name': 'Video Generation AI'}

## Base Endpoint
https://api.lowcodeapi.com/pictory

**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`

## Authentication
**Type:** TOKEN

**Official Documentation:** https://docs.pictory.ai/

## URL Format (Important)

LowCodeAPI supports two URL formats. **Always try the New Format first**, then fall back to Old Format if needed.

### New Format (Priority)
- Path parameters stay in the URL path
- Do NOT include path parameters as query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/{id}?api_token=XXX`

### Old Format (Fallback)
- Path parameters become query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/id?id={id}&api_token=XXX`

### Decision Flow for AI Agents
1. Always use **New Format** first - keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider

## API Categories

## Common Endpoints

### Create a new AWS connection

**Method:** POST
**LowCodeAPI Path:** /pictoryapis/v1/awsconnections

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| awsAccountId | string |  |
| awsRegion | string |  |
| description | string |  |
| enabled | boolean |  |
| name | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/createawsprivateconnection

### Get all AWS connections

**Method:** GET
**LowCodeAPI Path:** /pictoryapis/v1/awsconnections

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections?api_token=YOUR_API_TOKEN

**Query Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| pageKey | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/getawsprivateconnections

### Get details of a specific AWS connection

**Method:** GET
**LowCodeAPI Path:** /pictoryapis/v1/awsconnections/{connectionid}

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/{connectionid}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/connectionid?connectionid={connectionid}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| connectionid | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/{connectionid}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/getawsprivateconnection

### Update an existing AWS connection

**Method:** PUT
**LowCodeAPI Path:** /pictoryapis/v1/awsconnections/{connectionid}

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/{connectionid}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/connectionid?connectionid={connectionid}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| connectionid | string |  |

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| awsAccountId | string |  |
| awsRegion | string |  |
| description | string |  |
| enabled | boolean |  |
| name | string |  |
| version | number |  |

**Example Request (New Format):**

```bash
curl -X PUT 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/{connectionid}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/updateawsprivateconnection

### Delete an AWS connection

**Method:** DELETE
**LowCodeAPI Path:** /pictoryapis/v1/awsconnections/{connectionid}

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/{connectionid}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/connectionid?connectionid={connectionid}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| connectionid | string |  |

**Example Request (New Format):**

```bash
curl -X DELETE 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/awsconnections/{connectionid}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/deleteawsprivateconnection

### Generate a signed URL for file upload

**Method:** POST
**LowCodeAPI Path:** /pictoryapis/v1/media/generateurl

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/media/generateurl?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/media/generateurl?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| contentType | string |  |
| fileName | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/media/generateurl?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/generateurl

### Get voiceover tracks

**Method:** GET
**LowCodeAPI Path:** /pictoryapis/v1/voiceovers/tracks

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/voiceovers/tracks?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/voiceovers/tracks?api_token=YOUR_API_TOKEN

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/voiceovers/tracks?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/getvoiceovertracks

### Add a new voiceover track

**Method:** POST
**LowCodeAPI Path:** /pictoryapis/v1/voiceovers/tracks

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/voiceovers/tracks?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/voiceovers/tracks?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| accent | string |  |
| age | string |  |
| description | string |  |
| engine | string |  |
| gender | string |  |
| language | string |  |
| name | string |  |
| publicUserId | string |  |
| sample | string |  |
| service | string |  |
| voiceId | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/voiceovers/tracks?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/addvoiceovertrack

### Storyboard

**Method:** POST
**LowCodeAPI Path:** /pictoryapis/v1/video/storyboard

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/video/storyboard?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/video/storyboard?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| audio | object |  |
| autoHighlightKeywords | boolean |  |
| brandLogo | object |  |
| language | string |  |
| scenes | array |  |
| videoDescription | string |  |
| videoHeight | string |  |
| videoName | string |  |
| videoWidth | string |  |
| webhook | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/video/storyboard?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/storyboard-api

### Render Video

**Method:** POST
**LowCodeAPI Path:** /pictoryapis/v1/video/render

**New Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/video/render?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/pictory/pictoryapis/v1/video/render?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| audio | object |  |
| containsTextToImage | boolean |  |
| next_generation_video | boolean |  |
| output | object |  |
| scenes | array |  |
| webhook | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/pictory/pictoryapis/v1/video/render?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.pictory.ai/reference/video-rendering-api


## Usage Examples

### Example 1: Basic Chat Completion

Creating a simple text completion or chat message:

```bash
# Create a chat completion - no path parameters needed
curl -X POST "https://api.lowcodeapi.com/pictory/v1/chat/completions?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-name",
    "messages": [
      {"role": "user", "content": "Hello, how can you help me?"}
    ]
  }'

# Response includes generated content
```

### Example 2: Text Generation with Path Parameters

Generating text with specific model settings:

```bash
# Generate content using a specific model
curl -X POST "https://api.lowcodeapi.com/pictory/v1/models/generate?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a short poem about technology",
    "max_tokens": 100
  }'

# Or if the provider uses model in the path:
curl -X POST "https://api.lowcodeapi.com/pictory/v1/models/{MODEL_ID}:generateContent?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "Write a short story"}]}]
  }'
```

### Example 3: List Available Models

```bash
# Get list of available models
curl -X GET "https://api.lowcodeapi.com/pictory/v1/models?api_token=YOUR_API_TOKEN"
```

## Error Handling

LowCodeAPI returns standard HTTP status codes. Common errors:

| Status Code | Description |
|-------------|-------------|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters or request body |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Endpoint or resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Provider API error |

All error responses include error details:

```json
{
  "data": {
    "error": {
      "message": "Error description",
      "code": "ERROR_CODE"
    }
  }
}
```

## Complete Endpoint Reference

| Endpoint | Method | Category |
|----------|--------|----------|
| Create a new AWS connection | POST | Private AWS Connections API |
| Get all AWS connections | GET | Private AWS Connections API |
| Get details of a specific AWS connection | GET | Private AWS Connections API |
| Update an existing AWS connection | PUT | Private AWS Connections API |
| Delete an AWS connection | DELETE | Private AWS Connections API |
| Generate a signed URL for file upload | POST |  Upload Media Files to Blob Storage |
| Get voiceover tracks | GET | VoiceOvers API |
| Add a new voiceover track | POST | VoiceOvers API |
| Storyboard | POST | Video Generation API |
| Render Video | POST | Video Generation API |
| Render Video (PUT) | PUT | Video Generation API |
| Video-Summary | POST | Video Summary and Transcription API |
| Transcription API | POST | Video Summary and Transcription API |
| Create Template API | POST | Bulk Video Generation |
| Template Video-Preview API | POST | Bulk Video Generation |
| Get All Template API | GET | Bulk Video Generation |
| Update Template API | PUT | Bulk Video Generation |
| Get Template by Id | GET | Bulk Video Generation |
| Delete Template by Id | DELETE | Bulk Video Generation |
| Create Brand API | POST | Brand Kit APIs |
| Get Brand API | GET | Brand Kit APIs |
| Get Brand by Id | GET | Brand Kit APIs |
| Update Brand | PUT | Brand Kit APIs |
| Delete Brand By Id | DELETE | Brand Kit APIs |

## API Definition Endpoints

You can fetch the complete API specification for this provider:

**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/pictory/openapi'
```

**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/pictory/definition'
```

## Response Format

All responses are wrapped in a `data` key:

```json
{
  "data": {
    // Actual response from provider (object or array)
  }
}
```