Picsart Audio API

The Audio API from Picsart — 2 operation(s) for audio.

OpenAPI Specification

picsart-audio-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '1.0'
  title: Picsart GenAI Ads Audio 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: Audio
paths:
  /audio/adjust:
    post:
      summary: Adjust Audio
      operationId: video-adjust-audio
      description: 'Adjusts the input video''s audio volume, allows to add a new audio channel and control its volume.

        '
      tags:
      - Audio
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/VideoParameters'
              - $ref: '#/components/schemas/AdjustAudioParameters'
              - $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'
  /export/audio:
    post:
      summary: Extract Audio
      operationId: video-extract-audio
      description: 'Extract the input video''s audio channel.

        '
      tags:
      - Audio
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/VideoParameters'
              - $ref: '#/components/schemas/ExtractAudioParameters'
      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:
  responses:
    '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 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.
    '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.
    '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.
    '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.
    '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.
    '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.
    '202':
      description: Request successfully accepted for an asynchronous transformation.
      content:
        application/json:
          schema:
            type: object
            properties:
              transaction_id:
                type: string
                nullable: true
              status:
                type: string
                enum:
                - success
                - error
                - processing
                - queued
                nullable: false
          example:
            value:
              transaction_id: 931aed0a-5efd-4b62-9712-069b7147eec5
              status: processing
      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.
    '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.
    '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.
    '500':
      description: Internal Server Error
      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.
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
        detail:
          type: string
      required:
      - detail
    ExtractAudioParameters:
      type: object
      properties:
        format:
          type: string
          default: mp3
          enum:
          - mp3
          - m4a
          - wav
          - flac
          description: "Optionally select one of the audio formats (mp3 is chosen if left blank). Options are as follows:\n  * mp3\n  * m4a\n  * wav\n  * flac\n"
    VideoParameters:
      type: object
      properties:
        video_url:
          type: string
          description: Source video URL.
          maxLength: 2083
          minLength: 1
          format: uri
    401_Error:
      type: object
      properties:
        code:
          type: integer
          example: 401
        message:
          type: string
          example: Unauthorized
        detail:
          type: string
      required:
      - detail
    AdjustAudioParameters:
      type: object
      properties:
        audio_url:
          type: string
          description: The sound file url.
          nullable: true
        audio_volume:
          type: integer
          minimum: 0
          maximum: 100
          description: The volume of the audio.
          default: 100
        video_volume:
          type: integer
          minimum: 0
          maximum: 100
          description: The volume of the video.
          default: 100
    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
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Picsart-API-Key