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

# Submit generated content

> Submit a media file that was generated based on an authorized prompt for billing and final release authorization.



## OpenAPI

````yaml /openapi.yaml post /generated-content
openapi: 3.0.1
info:
  title: Interchange Public API
  version: 0.4.0
servers:
  - url: https://api.interchange.lotiai.com/v1
    description: Production
  - url: https://preview.api.interchange.lotiai.com/v1
    description: Preview
security:
  - ApiKeyAuth: []
paths:
  /generated-content:
    post:
      tags:
        - Interchange
      summary: Submit generated content
      description: >-
        Submit a media file that was generated based on an authorized prompt for
        billing and final release authorization.
      parameters:
        - schema:
            description: >-
              If true, the request is accepted immediately and processed in the
              background. Returns a jobId to track progress.
            allOf:
              - $ref: '#/components/schemas/__schema8'
          in: query
          name: async
          description: >-
            If true, the request is accepted immediately and processed in the
            background. Returns a jobId to track progress.
        - schema:
            $ref: '#/components/schemas/IdempotencyKeyHeader'
          in: header
          name: x-idempotency-key
          required: true
          description: Idempotency key to ensure replay-safe processing.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostGeneratedContentBody'
      responses:
        '200':
          description: >-
            Generated content was processed. Response contains compliance
            outcome and pricing information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostGeneratedContentResponse'
        '202':
          description: Accepted for asynchronous background processing.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      jobId:
                        type: string
                    required:
                      - jobId
                    additionalProperties: false
                  - type: object
                    properties: {}
                    additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden, e.g. content was generated for a prompt that was not
            authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Referenced prompt or resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict (idempotency or state)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    __schema8:
      type: string
      enum:
        - '0'
        - '1'
        - 'true'
        - 'false'
    IdempotencyKeyHeader:
      type: string
      minLength: 1
      description: Idempotency key to ensure replay-safe processing.
    PostGeneratedContentBody:
      type: object
      properties:
        promptId:
          $ref: '#/components/schemas/__schema5'
        type:
          $ref: '#/components/schemas/MediaType'
        contentUrl:
          $ref: '#/components/schemas/__schema6'
        callbackUrl:
          $ref: '#/components/schemas/__schema7'
      required:
        - promptId
        - type
        - contentUrl
        - callbackUrl
      additionalProperties: false
    PostGeneratedContentResponse:
      type: object
      properties:
        complianceResult:
          $ref: '#/components/schemas/ComplianceResult'
        complianceFailureReason:
          $ref: '#/components/schemas/__schema20'
        pricingResult:
          $ref: '#/components/schemas/__schema21'
      required:
        - complianceResult
        - complianceFailureReason
        - pricingResult
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/__schema19'
      required:
        - error
      additionalProperties: false
      description: Error payload with error message string.
    __schema5:
      description: >-
        ID of a previously authorized prompt from which the generated content
        was created.
      allOf:
        - $ref: '#/components/schemas/UUIDv7'
    MediaType:
      type: string
      enum:
        - video
        - audio
        - image
        - archive
      description: Type of media asset.
    __schema6:
      type: string
      format: uri
      description: >-
        Publicly accessible URL from which the generated content can be
        downloaded.
    __schema7:
      type: string
      format: uri
      description: URL to call when the generated content is processed.
    ComplianceResult:
      type: string
      enum:
        - compliant
        - not_compliant
      description: >-
        Indicator of whether a prompt or generated content complies with
        detected identities' rules.
    __schema20:
      nullable: true
      type: string
    __schema21:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/PricingResult'
    __schema19:
      type: string
    UUIDv7:
      type: string
      format: uuid
      pattern: >-
        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
    PricingResult:
      type: object
      properties:
        totalPriceMicros:
          $ref: '#/components/schemas/__schema22'
        priceMicrosByIdentity:
          $ref: '#/components/schemas/__schema23'
      required:
        - totalPriceMicros
        - priceMicrosByIdentity
      additionalProperties: false
      description: Aggregated pricing result mapped by identity.
    __schema22:
      nullable: true
      type: integer
      minimum: 0
      maximum: 9007199254740991
    __schema23:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/PricingComponent'
    PricingComponent:
      type: object
      properties:
        totalPriceMicros:
          $ref: '#/components/schemas/__schema24'
        rateCardId:
          $ref: '#/components/schemas/UUIDv7'
        name:
          $ref: '#/components/schemas/__schema25'
      required:
        - totalPriceMicros
        - rateCardId
        - name
      additionalProperties: false
      description: Breakdown of pricing for a single identity/rate card.
    __schema24:
      type: integer
      minimum: 0
      maximum: 9007199254740991
    __schema25:
      nullable: true
      type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued for Interchange; reach out to Loti to obtain an API key.

````