> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gengen.farm/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an asset

> Upload an image, video, or audio asset; preprocessing is asynchronous, so use it only after its status becomes Active.



## OpenAPI

````yaml openapi/byteplus-assets.yaml POST /assets
openapi: 3.1.0
info:
  title: BytePlus Assets API
  version: 1.0.0
  description: >-
    GENGEN reference for BytePlus asset groups, reusable assets, the public
    asset library, and real-person verification.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /assets:
    post:
      summary: Create an asset
      description: >
        Upload an image, video, or audio asset into an active asset group.

        Asset preprocessing is asynchronous. Poll the get-asset operation and
        use the asset only after Result.Status becomes Active.


        File requirements:


        - Images: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, or HEIF; under 30 MB

        - Videos: MP4 or MOV; 2–15 seconds; up to 50 MB

        - Audio: WAV or MP3; 2–15 seconds; up to 15 MB
      operationId: createAsset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssetRequest'
            example:
              GroupId: group-20260424-abc
              URL: https://example.com/portrait-front.jpg
              AssetType: Image
              Name: portrait-front
              Moderation:
                Strategy: Default
      responses:
        '200':
          description: The asset was accepted for preprocessing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdResultEnvelope'
              example:
                ResponseMetadata:
                  RequestId: '20260427000000000000000000000000'
                  Action: CreateAsset
                  Version: '2024-01-01'
                  Service: ark
                  Region: ap-southeast-1
                Result:
                  Id: asset-20260427-abc
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '502':
          $ref: '#/components/responses/ProviderError'
        default:
          $ref: '#/components/responses/ProviderError'
      x-codeSamples:
        - lang: bash
          label: Create asset
          source: |
            curl --request POST \
              --url https://gengen.farm/api/gengen/v1/assets \
              --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
              --header 'Content-Type: application/json' \
              --data '{
                "GroupId": "group-20260424-abc",
                "URL": "https://example.com/portrait-front.jpg",
                "AssetType": "Image",
                "Name": "portrait-front",
                "Moderation": {
                  "Strategy": "Default"
                }
              }'
components:
  schemas:
    CreateAssetRequest:
      type: object
      required:
        - GroupId
        - URL
        - AssetType
      properties:
        GroupId:
          type: string
          minLength: 1
          description: Provider asset group ID for an active group owned by the workspace.
        URL:
          type: string
          format: uri
          description: >
            Publicly reachable asset URL. Base64 uploads are not supported.


            File requirements:


            - Images: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, or HEIF; aspect
            ratio between 0.4 and 2.5; each dimension over 300 px and under
            6,000 px; under 30 MB

            - Videos: MP4 or MOV; 480p, 720p, or 1080p; 2–15 seconds; aspect
            ratio from 0.4 through 2.5; each dimension from 300 px through 6,000
            px; 409,600–2,086,876 total pixels; 24–60 FPS; up to 50 MB

            - Audio: WAV or MP3; 2–15 seconds; up to 15 MB
        AssetType:
          type: string
          description: |
            Supported asset types:

            - Image — image asset
            - Video — video asset
            - Audio — audio asset
          enum:
            - Image
            - Video
            - Audio
        Name:
          type: string
          maxLength: 64
          description: Asset name used for management and fuzzy search.
        Moderation:
          $ref: '#/components/schemas/ModerationOptions'
      additionalProperties: false
    IdResultEnvelope:
      type: object
      required:
        - ResponseMetadata
        - Result
      properties:
        ResponseMetadata:
          $ref: '#/components/schemas/ResponseMetadata'
        Result:
          type: object
          required:
            - Id
          properties:
            Id:
              type: string
          additionalProperties: true
      additionalProperties: true
    ModerationOptions:
      type: object
      properties:
        Strategy:
          type: string
          description: |
            Moderation strategy:

            - Default — standard moderation
            - Skip — available only when enabled for the provider account
          enum:
            - Default
            - Skip
          default: Default
      additionalProperties: false
    ResponseMetadata:
      type: object
      properties:
        RequestId:
          type: string
        Action:
          type: string
        Version:
          type: string
        Service:
          type: string
        Region:
          type: string
      additionalProperties: true
    Error:
      type: object
      properties:
        error_code:
          type: string
        error:
          type: string
        error_params:
          type: object
          additionalProperties: true
      additionalProperties: true
  responses:
    BadRequest:
      description: The request body or parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: The workspace does not have enough available balance.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key is not permitted to perform this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested asset, group, or verification session was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: The resource state conflicts with the requested operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ProviderError:
      description: GENGEN or the asset provider could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: GENGEN API key
      description: A workspace API key beginning with gengen_live_.

````