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

# Queue Run

> Create a new deployment run with the given parameters.



## OpenAPI

````yaml post /run/deployment/queue
openapi: 3.1.0
info:
  title: ComfyDeploy API
  description: >+

    ### Overview


    Welcome to the ComfyDeploy API!


    To create a run thru the API, use the [queue run
    endpoint](#tag/run/POST/run/deployment/queue).


    Check out the [get run endpoint](#tag/run/GET/run/{run_id}), for getting the
    status and output of a run.


    ### Authentication


    To authenticate your requests, include your API key in the `Authorization`
    header as a bearer token. Make sure to generate an API key in the [API Keys
    section of your ComfyDeploy account](https://www.comfydeploy.com/api-keys).


    ###

  version: V2
servers:
  - url: https://api.comfydeploy.com/api
    description: Production server
  - url: https://staging.api.comfydeploy.com/api
    description: Staging server
  - url: http://localhost:3011/api
    description: Local development server
security:
  - Bearer: []
paths:
  /run/deployment/queue:
    post:
      tags:
        - Run
      summary: Deployment - Queue
      description: Create a new deployment run with the given parameters.
      operationId: queue_deployment_run_run_deployment_queue_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentRunRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRunResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: typescript
          label: SDK (TypeScript)
          source: |-
            import { ComfyDeploy } from "comfydeploy";

            const comfyDeploy = new ComfyDeploy({
              bearer: "<YOUR_BEARER_TOKEN_HERE>",
            });

            async function run() {
              const result = await comfyDeploy.run.deployment.queue({
                inputs: {
                  "num_inference_steps": 30,
                  "prompt": "A beautiful landscape",
                  "seed": 42,
                },
                webhook: "https://myapp.com/webhook",
                deploymentId: "15e79589-12c9-453c-a41a-348fdd7de957",
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: python
          label: SDK (Python)
          source: |-
            from comfydeploy import ComfyDeploy

            with ComfyDeploy(
                bearer="<YOUR_BEARER_TOKEN_HERE>",
            ) as comfy_deploy:

                res = comfy_deploy.run.deployment.queue(request={
                    "inputs": {
                        "prompt": "A beautiful landscape",
                        "seed": 42,
                    },
                    "webhook": "https://myapp.com/webhook",
                    "deployment_id": "15e79589-12c9-453c-a41a-348fdd7de957",
                })

                assert res.create_run_response is not None

                # Handle response
                print(res.create_run_response)
components:
  schemas:
    DeploymentRunRequest:
      properties:
        inputs:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
              - items: {}
                type: array
          type: object
          title: Inputs
          description: The inputs to the workflow
          default: {}
          example:
            prompt: A beautiful landscape
            seed: 42
        webhook:
          type: string
          title: Webhook
        webhook_intermediate_status:
          type: boolean
          title: Webhook Intermediate Status
          default: false
          example: true
        gpu:
          type: string
          enum:
            - T4
            - L4
            - A10G
            - L40S
            - A100
            - A100-80GB
            - H100
          description: The GPU to override the machine's default GPU
        deployment_id:
          type: string
          format: uuid
          title: Deployment Id
          examples:
            - 15e79589-12c9-453c-a41a-348fdd7de957
      type: object
      required:
        - deployment_id
      title: DeploymentRunRequest
      examples:
        - deployment_id: 12345678-1234-5678-1234-567812345678
          inputs:
            num_inference_steps: 30
            prompt: A futuristic cityscape
            seed: 123456
          webhook: https://myapp.com/webhook
    CreateRunResponse:
      properties:
        run_id:
          type: string
          format: uuid
          title: Run Id
          description: The ID of the run, use this to get the run status and outputs
      type: object
      required:
        - run_id
      title: CreateRunResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    Bearer:
      type: http
      scheme: bearer

````