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

# Post v1execute



## OpenAPI

````yaml /openapi/managed.yaml post /v1/execute
openapi: 3.1.0
info:
  title: DreamLayer Managed Image API
  version: '1'
  description: Opaque conversational image execution for runtimes, apps, and agents.
servers:
  - url: https://api.dreamlayer.io
security:
  - bearerAuth: []
paths:
  /v1/execute:
    post:
      operationId: execute
      parameters:
        - $ref: '#/components/parameters/Version'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteRequest'
      responses:
        '200':
          description: Sanitized server-sent events
          content:
            text/event-stream:
              schema:
                type: string
        '202':
          description: Durable execution accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionAccepted'
components:
  parameters:
    Version:
      name: DreamLayer-Version
      in: header
      required: true
      schema:
        type: string
        const: '1'
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 200
  schemas:
    ExecuteRequest:
      type: object
      additionalProperties: false
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 4000
        respond:
          type: string
          minLength: 1
          maxLength: 4000
        conversation_id:
          type: string
          format: uuid
        input_asset_id:
          type: string
          format: uuid
        aspect_ratio:
          type: string
          default: '1:1'
        max_credits:
          type: integer
          enum:
            - 1
          default: 1
      oneOf:
        - required:
            - prompt
          not:
            required:
              - respond
        - required:
            - respond
            - conversation_id
          not:
            required:
              - prompt
    ExecutionAccepted:
      type: object
      additionalProperties: false
      required:
        - execution_id
        - conversation_id
        - status
      properties:
        execution_id:
          type: string
          format: uuid
        conversation_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - needs_input
            - queued
            - running
            - completed
            - failed
            - cancelled
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````