PowerPost APIv1
PowerPost APIv1
DashboardAPI keysPowerPost API
QuickstartAuthenticationWorkspacesErrors & Rate Limits
Input TypesPost TypesCreditsResearch Modes
Generate CaptionsGenerate ImagesPublish and ScheduleWebhooksMCP Server

Content

Generate ContentGenerations

Media

Upload MediaGenerate ImagesGenerate VideosVideo Captions

Publishing & planning

PostsPublish & SchedulePost ItemsAnalyticsCalendar

Account

Get Credits
Changelog
API reference

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"

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"

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 Create post:

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

Storage

Uploaded and generated media is retained until you delete it — there is no automatic expiration. Storage is billed monthly based on usage. Uploads require a positive credit balance.


Errors

CodeDescription
400Invalid file type or missing fields
401Invalid API key
402Insufficient credits (INSUFFICIENT_CREDITS)
403API key is missing the media:write scope
413File too large (FILE_TOO_LARGE)
429Rate limit exceeded

Generations

List generations, check status, and regenerate platform captions.

Generate Images

Create AI-generated images from text, reference images, or existing captions.

On this page

RequestHeadersForm FieldsSupported FormatsExampleUpload an ImageUpload a VideoResponseResponse FieldsUsing Uploaded MediaStorageErrors