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

# Get a prompt by ID

> Retrieve a prompt authorization result using the server-assigned jobId returned by an asynchronous POST /prompt. Identity reference asset URLs are delivered with the authorization callback and are not included here.



## OpenAPI

````yaml /openapi.yaml get /prompt/{id}
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:
  /prompt/{id}:
    get:
      tags:
        - Interchange
      summary: Get a prompt by ID
      description: >-
        Retrieve a prompt authorization result using the server-assigned jobId
        returned by an asynchronous POST /prompt. Identity reference asset URLs
        are delivered with the authorization callback and are not included here.
      parameters:
        - schema:
            $ref: '#/components/schemas/UUIDv7'
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Prompt found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPromptResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Prompt not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The server response budget was exceeded. The operation may still
            complete; check its state before retrying a non-idempotent request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - handler_timed_out
components:
  schemas:
    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})$
    GetPromptResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/UUIDv7'
        createdAt:
          $ref: '#/components/schemas/Timestamp'
        updatedAt:
          $ref: '#/components/schemas/Timestamp'
        promptText:
          $ref: '#/components/schemas/__schema15'
        enhancedPromptText:
          $ref: '#/components/schemas/__schema16'
        enhancedPromptStrictnessLevel:
          $ref: '#/components/schemas/__schema17'
        providerId:
          $ref: '#/components/schemas/UUIDv7'
        generatedContentType:
          $ref: '#/components/schemas/GeneratedContentType'
        licenseType:
          $ref: '#/components/schemas/LicenseType'
        pricingUnit:
          $ref: '#/components/schemas/PricingUnit'
        estimatedQuantity:
          $ref: '#/components/schemas/EstimatedQuantity'
        estimatedTotalPriceMicros:
          $ref: '#/components/schemas/__schema18'
        authorizationResult:
          $ref: '#/components/schemas/AuthorizationResult'
        authorizationDeniedCode:
          $ref: '#/components/schemas/AuthorizationDeniedCodeResponse'
        authorizationDeniedReason:
          $ref: '#/components/schemas/__schema19'
      required:
        - id
        - createdAt
        - updatedAt
        - promptText
        - enhancedPromptText
        - enhancedPromptStrictnessLevel
        - providerId
        - generatedContentType
        - licenseType
        - pricingUnit
        - estimatedQuantity
        - estimatedTotalPriceMicros
        - authorizationResult
        - authorizationDeniedCode
        - authorizationDeniedReason
      additionalProperties: false
      description: Response when fetching a prompt by ID.
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/__schema21'
      required:
        - error
      additionalProperties: false
      description: Error payload with error message string.
    Timestamp:
      type: string
      format: date-time
      pattern: >-
        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      description: ISO 8601 timestamp in UTC.
    __schema15:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/PromptText'
    __schema16:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/EnhancedPromptText'
    __schema17:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/EnhancedPromptStrictnessLevel'
    GeneratedContentType:
      type: string
      enum:
        - image
        - video
        - audio_voice
      description: Type of content being generated.
    LicenseType:
      type: string
      enum:
        - personal
        - limited_commercial
        - major_commercial
      description: >-
        Type of license for content usage: personal (non-commercial),
        limited_commercial (small business/limited reach), or major_commercial
        (large campaigns, requires approval).
    PricingUnit:
      type: string
      enum:
        - word_count
        - asset_count
        - length_seconds
      description: Unit of generated content, for billing purposes.
    EstimatedQuantity:
      type: integer
      minimum: 0
      exclusiveMinimum: true
      maximum: 86400
      description: Provider-supplied estimate of how many pricing units will be generated.
    __schema18:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/EstimatedTotalPriceMicros'
    AuthorizationResult:
      type: string
      enum:
        - pending
        - authorized
        - not_authorized
        - failed
      description: >-
        Outcome of prompt authorization: 'authorized' (prompt approved, proceed
        to generate), 'not_authorized' (prompt denied, see
        authorizationDeniedCode and authorizationDeniedReason), 'failed'
        (authorization could not be completed), or 'pending' (still processing).
    AuthorizationDeniedCodeResponse:
      nullable: true
      description: >-
        If prompt authorization was denied, contains a machine-readable code
        describing the denial reason.
      allOf:
        - $ref: '#/components/schemas/AuthorizationDeniedCode'
    __schema19:
      allOf:
        - $ref: '#/components/schemas/AuthorizationDeniedReason'
    __schema21:
      type: string
    PromptText:
      type: string
      minLength: 1
      description: Original prompt text provided by the requester.
    EnhancedPromptText:
      type: string
      description: >-
        Experimental: Prompt text after enhancement, if applied. This field may
        be removed in a future API version.
    EnhancedPromptStrictnessLevel:
      type: integer
      minimum: 1
      maximum: 5
      description: >-
        Experimental: Strictness level applied by the enhancer. This field may
        be removed in a future API version.
    EstimatedTotalPriceMicros:
      type: integer
      minimum: 0
      maximum: 9007199254740991
      description: >-
        Estimated total price in micros (millionths of a USD); null when
        authorization is denied.
    AuthorizationDeniedCode:
      type: string
      enum:
        - RULES_VIOLATION
        - RULES_NOT_CONFIGURED
        - RATE_CARD_NOT_CONFIGURED
        - INCOMPLETE_PRICING
        - NO_IDENTITIES
        - NO_TEXT
        - IDENTITIES_NOT_FOUND
        - MAJOR_COMMERCIAL_NOT_SUPPORTED
        - NO_AGREEMENT_FOR_LICENSE_TYPE
      description: >-
        Machine-readable code describing why prompt authorization was denied,
        when applicable.
    AuthorizationDeniedReason:
      nullable: true
      description: >-
        If prompt authorization was denied, contains a human-readable
        explanation of the reason for denial.
      allOf:
        - $ref: '#/components/schemas/__schema20'
    __schema20:
      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.

````