PicsArt (Socialin) Edit API
The Edit API from PicsArt (Socialin) — 6 operation(s) for edit.
The Edit API from PicsArt (Socialin) — 6 operation(s) for edit.
openapi: 3.0.0
info:
version: '1.0'
title: Picsart GenAI Ads Edit API
description: '[Official technical documentation portal](https://docs.picsart.io/)
[Developer Guidelines](https://picsart.io/terms)
'
servers:
- url: https://genai-api.picsart.io/v1
description: Production
security:
- apiKey: []
tags:
- name: Edit
paths:
/edit:
post:
summary: Edit Video
operationId: video-edit
description: 'Comprehensive editing with one operation. Apply effect, adjust, trim, crop, resize, change codecs, compression, framerates, etc.
'
tags:
- Edit
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VideoParameters'
- $ref: '#/components/schemas/EditParameters'
- $ref: '#/components/schemas/ExtendedExportParameters'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'402':
$ref: '#/components/responses/402'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'429':
$ref: '#/components/responses/429'
'431':
$ref: '#/components/responses/431'
'500':
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
/trim:
post:
summary: Trim Video
operationId: video-trim
description: 'Trim the input video clip: pull a specific segment or trim to your desired video clip duration.
'
tags:
- Edit
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VideoParameters'
- $ref: '#/components/schemas/TrimParameters'
- $ref: '#/components/schemas/ExportParameters'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'402':
$ref: '#/components/responses/402'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'429':
$ref: '#/components/responses/429'
'431':
$ref: '#/components/responses/431'
'500':
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
/crop:
post:
summary: Crop Video
operationId: video-crop
description: 'Crop the input video clip to the desired size.
'
tags:
- Edit
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VideoParameters'
- $ref: '#/components/schemas/CropParameters'
- $ref: '#/components/schemas/ExportParameters'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'402':
$ref: '#/components/responses/402'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'429':
$ref: '#/components/responses/429'
'431':
$ref: '#/components/responses/431'
'500':
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
/concat:
post:
summary: Concatenate Videos and Images
operationId: video-concat
description: 'Concatenate several videos clips and images with transitions into one timeline. Helpful when adding intro/outro- or creating slideshows.
'
tags:
- Edit
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ConcatParameters'
- $ref: '#/components/schemas/ExportParameters'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'402':
$ref: '#/components/responses/402'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'429':
$ref: '#/components/responses/429'
'431':
$ref: '#/components/responses/431'
'500':
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
/concat/highlights:
summary: Create a Video highlight
post:
operationId: video-concat-highlights
description: 'Create a highlights video from the original one. This picks highlight clips and concatenates them into one output video.
'
tags:
- Edit
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VideoParameters'
- $ref: '#/components/schemas/ConcatSegmentsParameters'
- $ref: '#/components/schemas/ExportParameters'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'402':
$ref: '#/components/responses/402'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'429':
$ref: '#/components/responses/429'
'431':
$ref: '#/components/responses/431'
'500':
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
/fit:
post:
summary: Fit Video
operationId: video-fit
description: 'Fit your original video to different ratios or width and height options. Apply fit when resizing and cropping is not an option.
'
tags:
- Edit
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VideoParameters'
- $ref: '#/components/schemas/FitParameters'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'402':
$ref: '#/components/responses/402'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'429':
$ref: '#/components/responses/429'
'431':
$ref: '#/components/responses/431'
'500':
$ref: '#/components/responses/500'
'503':
$ref: '#/components/responses/503'
components:
schemas:
Transition:
type: object
properties:
transition:
type: string
default: none
enum:
- none
- fade
- zoom_in
- zoom_out
- spin
- fly_in_from_left
- fly_in_from_right
- fly_in_from_top
- fly_in_from_bottom
- fly_out_to_left
- fly_out_to_right
- fly_out_to_bottom
- fly_out_to_top
EditParameters:
type: object
properties:
fit:
$ref: '#/components/schemas/FitParameters'
crop:
$ref: '#/components/schemas/CropParameters'
VideoParameters:
type: object
properties:
video_url:
type: string
description: Source video URL.
maxLength: 2083
minLength: 1
format: uri
CropParameters:
type: object
properties:
width:
type: integer
minimum: 16
description: 'Width of the outcome video. If the new width is larger than the original width, the blurry mirror effect should be applied to the additional part. The measurement unit is px. The default value is the original width. Value must be at least 16 px.
'
height:
type: integer
minimum: 16
description: 'Height of the output video. If the new height is larger than the original height, the blurry mirror effect should be applied to the additional part. The measurement unit is px. The default value is the original height. Value must be at least 16 px.
'
start_x:
type: integer
default: 0
minimum: 0
description: The starting x location of the crop in px as measured from the left edge.
start_y:
type: integer
default: 0
minimum: 0
description: The starting y location of the crop in px as measured from the bottom edge.
FitParameters:
type: object
properties:
ratio:
type: number
format: float
nullable: true
minimum: 0.1
maximum: 10.0
description: 'The value should be a single floating point number which represents the ratio of width and height. The formula is: parameter value = width / height. The default value is that of the original video.
'
width:
type: integer
minimum: 16
nullable: true
description: 'Width of the outcome video. If the new width is larger than the original width, the blurry mirror effect should be applied to the additional part. The measurement unit is px. The default value is the original width. Value must be at least 16 px.
'
height:
type: integer
minimum: 16
nullable: true
description: 'Height of the outcome video. If the new height is larger than the original height, the blurry mirror effect should be applied to the additional part. The measurement unit is px. The default value is the original height. Value must be at least 16 px.
'
bg_color:
type: string
nullable: true
description: 'Can be a hexcolor code (e.g., #82d5fa, #fff) or a color name (e.g., blue). For semi-transparency, 4-/8-digit hexcodes are also supported (e.g., #18d4ff87). (If this parameter is present, the other bg_ parameters must be empty).
'
bg_blur:
type: integer
default: 0
minimum: 0
maximum: 100
description: Enter an integer value from 0 to 100.
bg_image_url:
type: string
description: Background image URL.
maxLength: 2083
minLength: 1
format: uri
bg_video_url:
type: string
description: Background video URL.
maxLength: 2083
minLength: 1
format: uri
ConcatVideoParameters:
type: object
properties:
video_url:
type: string
description: Source video URL. (Use either image_url or video_url.)
maxLength: 2083
minLength: 1
format: uri
nullable: true
volume:
type: integer
default: 100
minimum: 0
maximum: 100
nullable: true
description: Control the video volume. Adjust from 0 to 100. 0 will mute the video completely and 100 will have it at max.
401_Error:
type: object
properties:
code:
type: integer
example: 401
message:
type: string
example: Unauthorized
detail:
type: string
required:
- detail
ConcatSegmentsParameters:
type: object
properties:
trim_segments:
type: array
description: List of segments to combine/merge.
items:
type: object
properties:
start:
type: integer
default: 0
minimum: 0
nullable: false
description: The start time of the segment in milliseconds.
end:
type: integer
minimum: 1
nullable: false
description: The end time of the segment in milliseconds.
transition:
type: string
enum:
- none
- fade
- zoom_in
- zoom_out
- spin
- fly_in_from_left
- fly_in_from_right
- fly_in_from_top
- fly_in_from_bottom
- fly_out_to_left
- fly_out_to_right
- fly_out_to_bottom
- fly_out_to_top
default: none
nullable: true
description: The transition between segments.
required:
- start
- end
minItems: 2
maxItems: 10
ConcatImageParameters:
type: object
properties:
image_url:
type: string
description: Source image URL. (Use either image_url or video_url.)
maxLength: 2083
minLength: 1
format: uri
nullable: true
scale:
type: string
enum:
- fit
- fill
default: fit
nullable: true
description: 'Fit is where the longer side (width/height) fits the video canvas (e.g. see the width and height params). Fill is where the shorter side fits the background. Fit is the default.
'
duration:
type: integer
minimum: 1
default: 1000
description: Duration of the image in milliseconds. Applies only if the image_url is provided.
nullable: true
TrimParameters:
type: object
properties:
start:
type: integer
default: 0
minimum: 0
description: This is the point in time of the video from where the trimming begins in milliseconds.
end:
type: integer
default: 1000
minimum: 1000
description: This is the point in time of the video where the trimming ends in milliseconds. It must be greater than `start`.
required:
- start
- end
Error:
type: object
properties:
message:
type: string
detail:
type: string
required:
- detail
ConcatParameters:
type: object
properties:
items:
type: array
description: List of videos and images to combine into a slideshow.
items:
allOf:
- $ref: '#/components/schemas/ConcatVideoParameters'
- $ref: '#/components/schemas/ConcatImageParameters'
- $ref: '#/components/schemas/Transition'
minItems: 1
maxItems: 10
bg_audio_url:
type: string
description: Background audio/sound URL.
maxLength: 2083
minLength: 1
format: uri
nullable: true
bg_audio_repeat:
type: boolean
default: true
nullable: true
description: Use true to repeat the audion in the background for the whole video duration or false if you want to play the audio only once.
bg_audio_volume:
type: integer
default: 100
minimum: 0
maximum: 100
nullable: true
description: Control the audio volume. Adjust from 0 to 100. 0 will mute the audio completely and 100 will have it at max.
ExportParameters:
type: object
properties:
export:
type: object
properties:
format:
type: string
default: MP4
enum:
- MOV
- MP4
- WEBM
- GIF
description: "Optionally select one of the output video formats (MP4 is chosen if left blank). Container options are as follows\n * MOV\n * MP4\n * WEBM\n * GIF\n"
frame_rate:
type: integer
default: 30
minimum: 1
maximum: 60
description: The output video frame rate.
bitrate:
type: integer
minimum: 1
maximum: 10000
description: The output video bitrate in kb/s. Leave empty to set automatically and optimize accordingly.
default:
format: MP4
frame_rate: 30
ExtendedExportParameters:
type: object
properties:
export:
type: object
properties:
format:
type: string
default: MP4
enum:
- MOV
- MP4
- WEBM
- GIF
description: "Optionally select one of the output video formats (MP4 is chosen if left blank). Container options are as follows\n * MOV\n * MP4\n * WEBM\n * GIF\n"
max_size_mb:
type: integer
nullable: true
description: The maximum target size in megabytes (not strict).
quality:
type: string
enum:
- low
- medium
- high
default: medium
description: The quality of the output video. You can choose from low, medium or high quality outputs. By default medium is applied.
codec:
type: string
enum:
- default
- HEVC
- h264
- theora
- vp8
- vp9
- gif
- av1
- cinepak
- ffv1
- MPEG4
- vc2
default: default
description: The video codec. Use "default" to keep the video codec the same.
audio_codec:
type: string
enum:
- default
- aac
- ac3
- opus
- mp3
- ogg_vorbis
- ogg_speex
- wav
- flac
- PCM
default: default
description: The audio codec. Use "default" to keep the video codec the same.
frame_rate:
type: integer
default: 30
minimum: 1
maximum: 60
description: The output video frame rate.
bitrate:
type: integer
minimum: 1
maximum: 10000
description: The output video bitrate in kb/s. Leave empty to set automatically and optimize accordingly.
color_space:
type: string
enum:
- SRGB
- DisplayP3
default: SRGB
description: The color space of the output video.
default:
format: MP4
quality: medium,
codec: default,
audio_codec: default,
frame_rate: 30,
color_space: SRGB
responses:
'402':
description: Payment Required
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'413':
description: Request Entity Too Large
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/401_Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'431':
description: Request Header Fields Too Large
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'415':
description: Unsupported Media Type
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'503':
description: Service Unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and the number of available calls gets equal to the total number.
X-Picsart-Credit-Available:
schema:
type: integer
description: The remaining number of the credits on the balance.
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
X-Picsart-Correlation-Id:
schema:
type: string
description: The id which will help for troubleshooting request chain in the system.
X-Picsart-Ratelimit-Available:
schema:
type: integer
description: The number of available calls within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Limit:
schema:
type: integer
description: The total number of requests that can be done within the timeframe. See the X-Picsart-Ratelimit-Reset-Time.
X-Picsart-Ratelimit-Reset-Time:
schema:
type: integer
description: The time when the used request count resets and t
# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/picsart-socialin/refs/heads/main/openapi/picsart-socialin-edit-api-openapi.yml