> ## 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.

# Update an asset

> Rename an asset owned by the current GENGEN workspace.



## OpenAPI

````yaml openapi/byteplus-assets.yaml POST /assets/update
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/update:
    post:
      summary: Update an asset
      description: Rename an asset owned by the current workspace.
      operationId: updateAsset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAssetRequest'
            example:
              Id: asset-20260427-abc
              Name: portrait-front-approved
      responses:
        '200':
          description: The asset was renamed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdResultEnvelope'
              example:
                ResponseMetadata:
                  RequestId: '20260328000000000000000000000000'
                  Action: UpdateAsset
                  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'
        '502':
          $ref: '#/components/responses/ProviderError'
        default:
          $ref: '#/components/responses/ProviderError'
      x-codeSamples:
        - lang: bash
          label: Update asset
          source: |
            curl --request POST \
              --url https://gengen.farm/api/gengen/v1/assets/update \
              --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
              --header 'Content-Type: application/json' \
              --data '{
                "Id": "asset-20260427-abc",
                "Name": "portrait-front-approved"
              }'
components:
  schemas:
    UpdateAssetRequest:
      type: object
      required:
        - Id
        - Name
      properties:
        Id:
          type: string
          minLength: 1
          description: Asset ID returned by the create-asset operation.
        Name:
          type: string
          minLength: 1
          maxLength: 64
          description: New asset name.
      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
    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'
    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_.

````