PowerPost APIv1
PowerPost APIv1
PowerPost APIQuickstartAuthenticationWorkspacesInput Types

API Reference

Upload MediaGenerate ContentGenerationsGenerate ImagesPosts & PublishingGet Credits

Guides

WebhooksError CodesChangelog

Upload Media

Upload images or videos for use in content generation or publishing.

POST /api/v1/media/upload

Upload images or videos to use as input for caption generation, image generation, or publishing.


Request

Send a multipart/form-data request with the file and metadata.

Headers

HeaderValue
x-api-keyYour API key
X-Workspace-IdYour workspace ID
Content-Typemultipart/form-data

Form Fields

FieldTypeRequiredDescription
filefileYesThe image or video file to upload
typestringYesimage or video

Supported Formats

TypeFormatsMax Size
ImageJPEG, PNG, WebP10 MB
VideoMP4, MOV, WebM500 MB

Example

Upload an Image

curl -X POST https://powerpost.ai/api/v1/media/upload \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID" \
  -F "file=@photo.jpg" \
  -F "type=image"
const formData = new FormData()
formData.append('file', fs.createReadStream('photo.jpg'))
formData.append('type', 'image')

const res = await fetch('https://powerpost.ai/api/v1/media/upload', {
method: 'POST',
headers: {
'x-api-key': 'pp_live_sk_YOUR_KEY',
'X-Workspace-Id': 'YOUR_WORKSPACE_ID',
},
body: formData,
})
const data = await res.json()
import requests

res = requests.post(
    "https://powerpost.ai/api/v1/media/upload",
    headers={
        "x-api-key": "pp_live_sk_YOUR_KEY",
        "X-Workspace-Id": "YOUR_WORKSPACE_ID",
    },
    files={"file": open("photo.jpg", "rb")},
    data={"type": "image"},
)
data = res.json()

Upload a Video

curl -X POST https://powerpost.ai/api/v1/media/upload \
  -H "x-api-key: pp_live_sk_YOUR_KEY" \
  -H "X-Workspace-Id: YOUR_WORKSPACE_ID" \
  -F "file=@video.mp4" \
  -F "type=video"
const formData = new FormData()
formData.append('file', fs.createReadStream('video.mp4'))
formData.append('type', 'video')

const res = await fetch('https://powerpost.ai/api/v1/media/upload', {
method: 'POST',
headers: {
'x-api-key': 'pp_live_sk_YOUR_KEY',
'X-Workspace-Id': 'YOUR_WORKSPACE_ID',
},
body: formData,
})
const data = await res.json()
import requests

res = requests.post(
    "https://powerpost.ai/api/v1/media/upload",
    headers={
        "x-api-key": "pp_live_sk_YOUR_KEY",
        "X-Workspace-Id": "YOUR_WORKSPACE_ID",
    },
    files={"file": open("video.mp4", "rb")},
    data={"type": "video"},
)
data = res.json()

Response

{
  "media_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "type": "image",
  "file_name": "photo.jpg",
  "file_size": 245000,
  "mime_type": "image/jpeg",
  "created_at": "2026-01-10T18:30:00Z"
}

Response Fields

FieldTypeDescription
media_idstringUnique ID to reference in other requests
typestringimage or video
file_namestringOriginal file name
file_sizenumberFile size in bytes
mime_typestringMIME type of the uploaded file
created_atstringISO 8601 timestamp

Using Uploaded Media

Once uploaded, use the media_id in other endpoints:

Caption generation — Pass media_ids to the Generate Content endpoint:

{
  "media_ids": ["a1b2c3d4-..."],
  "post_types": ["instagram-feed"],
  "research_mode": "regular"
}

Image generation — Pass as style_images to the Generate Images endpoint:

{
  "prompt": "Product photo in the same style",
  "style_images": ["a1b2c3d4-..."],
  "size": "square"
}

Publishing — Attach to posts via the Create Post endpoint:

{
  "items": [{ "post_type": "instagram-feed", "content": "...", "media_ids": ["a1b2c3d4-..."] }]
}

Storage

All accounts have a 10 GB storage quota. Uploaded and generated media counts toward this quota. Media is retained until you delete it — there is no automatic expiration.

When your storage is full, uploads are rejected with a 413 error. Free up space by deleting unused media in your dashboard.


Errors

CodeDescription
400Invalid file type or missing fields
401Invalid API key
413File too large (FILE_TOO_LARGE) or storage quota exceeded (STORAGE_QUOTA_EXCEEDED)
429Rate limit exceeded

Input Types

Generate content from text, images, or video.

Generate Content

Start a new content generation job from text, images, or video.

On this page

RequestHeadersForm FieldsSupported FormatsExampleUpload an ImageUpload a VideoResponseResponse FieldsUsing Uploaded MediaStorageErrors