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

# Create a task

> Creates a task from real estate listing data.



## OpenAPI

````yaml https://api.infinitecreator.com/openapi.json post /v1/tasks
openapi: 3.1.0
info:
  title: Infinite Creator API
  description: >-
    For more information, refer to the [official
    documentation](https://docs.infinitecreator.com).
  version: 1.3.0
servers:
  - url: https://api.infinitecreator.com
security: []
paths:
  /v1/tasks:
    post:
      tags:
        - tasks
      summary: Create a task
      description: Creates a task from real estate listing data.
      operationId: create_endpoint_v1_tasks_post
      parameters:
        - name: infinitecreator-beta
          in: header
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            description: >-
              Beta headers allow access to experimental features before they
              become part of the standard API.
            title: Infinitecreator-Beta
          description: >-
            Beta headers allow access to experimental features before they
            become part of the standard API.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Listing'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTask'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Payment Required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Method Not Allowed
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Service Unavailable
components:
  schemas:
    Listing:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the object.
          examples:
            - L12345678
        assets:
          items:
            $ref: '#/components/schemas/Asset'
          type: array
          maxItems: 100
          minItems: 5
          title: Assets
          description: Listing assets.
        agents:
          items:
            $ref: '#/components/schemas/Agent'
          type: array
          maxItems: 20
          minItems: 1
          title: Agents
          description: Agents associated with the listing. We will make 1 video per agent.
        address:
          $ref: '#/components/schemas/Address'
          description: Listing address.
        bedrooms:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Bedrooms
          description: Number of bedrooms
          examples:
            - 3
        bathrooms:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Bathrooms
          description: Number of bathrooms
          examples:
            - 2
        half_bathrooms:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Half Bathrooms
          description: Number of half bathrooms
          examples:
            - 1
        interior_square_footage:
          anyOf:
            - type: number
              minimum: 1
            - type: 'null'
          title: Interior Square Footage
          description: Interior square footage
          examples:
            - 1231.5
      type: object
      required:
        - id
        - assets
        - agents
      title: Listing
    ScheduledTask:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the object.
          examples:
            - 01K364FEGEDX32AK5RK447H2KP
      type: object
      required:
        - id
      title: ScheduledTask
    APIError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
      additionalProperties: false
      type: object
      title: APIError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Asset:
      properties:
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
          description: >-
            Publicly accessible URL of the asset. See [our
            documentation](https://docs.infinitecreator.com/api-reference/inputs#images)
            for more information.
          examples:
            - https://example.com/image.jpg
        type:
          type: string
          const: image
          title: Type
          description: Type of asset
          default: image
      type: object
      required:
        - url
      title: Asset
    Agent:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the object.
          examples:
            - A12345678
        first_name:
          type: string
          maxLength: 255
          title: First Name
          description: First name of the agent
          examples:
            - John
        last_name:
          type: string
          maxLength: 255
          title: Last Name
          description: Last name of the agent
          examples:
            - Doe
        picture:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Picture
          description: Profile picture of the agent.
          examples:
            - https://example.com/profile_picture.png
        designation:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Designation
          description: Designation of the agent
          examples:
            - Licensed Real Estate Associate
        phones:
          items:
            $ref: '#/components/schemas/Phone'
          type: array
          title: Phones
          description: Phone numbers of the agent
        emails:
          items:
            $ref: '#/components/schemas/Email'
          type: array
          title: Emails
          description: Email addresses of the agent
        licenses:
          items:
            $ref: '#/components/schemas/License'
          type: array
          title: Licenses
          description: Licenses of the agent
        video_options:
          $ref: '#/components/schemas/VideoOptions'
          description: Customize the look and feel of the video for this agent.
        offices:
          items:
            $ref: '#/components/schemas/Office'
          type: array
          title: Offices
          description: Offices of the agent
      type: object
      required:
        - id
        - first_name
        - last_name
      title: Agent
    Address:
      properties:
        street:
          type: string
          title: Street
          examples:
            - 123 Main Street
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          examples:
            - NY
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          examples:
            - New York
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
          examples:
            - '10001'
      type: object
      required:
        - street
      title: Address
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Phone:
      properties:
        number:
          type: string
          title: Number
          description: >-
            Phone number. We accept a number in any format (E164, national,
            international etc), assuming it can be interpreted with the region
            supplied. If we fail to parse your phone number, it will not be
            used.
          examples:
            - +1 (805) 293-2878
            - (512) 692-7898
            - '+15122401878'
            - 1800MICROSOFT
        type:
          anyOf:
            - type: string
              enum:
                - office
                - mobile
                - direct
            - type: 'null'
          title: Type
          description: Type of phone number.
          examples:
            - mobile
        region:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: 'null'
          title: Region
          description: >-
            The region that we are expecting the number to be from. This is only
            used if the number being parsed is not written in international
            format.
          default: US
          examples:
            - US
            - CA
      type: object
      required:
        - number
      title: Phone
    Email:
      properties:
        address:
          type: string
          format: email
          title: Address
          description: Email address
          examples:
            - john.doe@example.com
      type: object
      required:
        - address
      title: Email
    License:
      properties:
        number:
          type: string
          maxLength: 100
          minLength: 1
          title: Number
          description: License number
          examples:
            - '1234567890'
        state:
          type: string
          maxLength: 64
          minLength: 1
          title: State
          description: State of the license
          examples:
            - NY
            - FL
            - LA
      type: object
      required:
        - number
        - state
      title: License
    VideoOptions:
      properties:
        ratio:
          type: string
          enum:
            - '1920:1080'
            - '1080:1920'
          title: Ratio
          description: Resolution of the output video.
          default: '1920:1080'
          examples:
            - '1920:1080'
            - '1080:1920'
        template_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Template Id
          description: ID of the Template to use.
        template_data:
          additionalProperties:
            type: string
          type: object
          title: Template Data
          description: >-
            Set of key-value pairs corresponding to the data layers of the
            Template. Only takes effect if `template_id` is specified.
        create_preview:
          type: boolean
          title: Create Preview
          description: >-
            When this is enabled, a short gif will be generated along with the
            main video.
          default: false
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format. Key-value pairs specified here can be found
            unchanged within the corresponding Task result. Supports up to 50
            keys, with maximum key length of 40 characters and maximum value
            length of 500 characters. Keys and values are stored as strings.
            Keys cannot contain square brackets. Don't store any sensitive
            information (bank account numbers, card details, and so on) as
            metadata.
      type: object
      title: VideoOptions
    Office:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        phone_number:
          anyOf:
            - $ref: '#/components/schemas/Phone'
            - type: 'null'
      type: object
      title: Office

````