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

# Create Asset



## OpenAPI

````yaml openapi.json post /assets
openapi: 3.1.0
info:
  title: Hedra Web API
  version: 0.1.0
servers:
  - url: https://api.hedra.com/web-app/public
    description: Hedra Public API
security: []
paths:
  /assets:
    post:
      tags:
        - Public
      summary: Create Asset
      operationId: create_asset_public_assets_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAssetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateAssetRequest:
      properties:
        name:
          type: string
          title: Name
          description: Name of the asset. Default to user-provided file name.
        type:
          $ref: '#/components/schemas/AssetType'
          description: The type of the asset.
      type: object
      required:
        - name
        - type
      title: CreateAssetRequest
    CreateAssetResponse:
      properties:
        name:
          type: string
          title: Name
          description: Name of the asset. Default to user-provided file name.
        type:
          $ref: '#/components/schemas/AssetType'
          description: The type of the asset.
        id:
          type: string
          format: uuid
          title: Id
          description: The id of the newly created asset. Should be used for upload.
        upload_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Upload Url
          description: >-
            Presigned S3 URL for uploading the asset file using HTTP PUT. Only
            present when the asset type is VIDEO.
      type: object
      required:
        - name
        - type
        - id
      title: CreateAssetResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AssetType:
      type: string
      enum:
        - text
        - image
        - audio
        - video
        - voice
      title: AssetType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````