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

# Create Request

> Enqueue a new inference job for the specified model. Request body must match the model's PredictionRequest schema.



## OpenAPI

````yaml /openapi.json post /{ownerName}/{modelName}
openapi: 3.1.0
info:
  title: ModelRunner Requests API
  version: 1.0.0
  description: >-
    Endpoints to create, track, retrieve, and cancel inference requests on
    ModelRunner.
servers:
  - url: https://queue.modelrunner.run
security:
  - apiKeyAuth: []
paths:
  /{ownerName}/{modelName}:
    post:
      summary: Create Request
      description: >-
        Enqueue a new inference job for the specified model. Request body must
        match the model's PredictionRequest schema.
      parameters:
        - $ref: '#/components/parameters/ownerName'
        - $ref: '#/components/parameters/modelName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictionRequest'
              type: object
              description: >-
                Model-specific input. Validated against the model's
                PredictionRequest schema at runtime.
      responses:
        '201':
          description: Request created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRequestResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/InsufficientBalance'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ownerName:
      name: ownerName
      in: path
      required: true
      schema:
        type: string
        default: bytedance
      description: Model owner or organization name.
    modelName:
      name: modelName
      in: path
      required: true
      schema:
        type: string
        default: sdxl-lightning-4step
      description: Model alias on ModelRunner.
  schemas:
    PredictionRequest:
      type: object
      properties:
        prompt:
          type: string
        negative_prompt:
          type: string
        width:
          type: number
        height:
          type: number
        num_outputs:
          type: number
        scheduler:
          type: string
        num_inference_steps:
          type: number
        guidance_scale:
          type: number
        seed:
          type: number
        disable_safety_checker:
          type: string
          enum:
            - 'false'
      description: >-
        Model-specific input. Validated against the model's PredictionRequest
        schema at runtime.
      default:
        prompt: two friends cooking together
        negative_prompt: worst quality, low quality, deformed, extra fingers
        width: 1280
        height: 1024
        num_outputs: 1
        scheduler: K_EULER
        num_inference_steps: 4
        guidance_scale: 0
        seed: 103
        disable_safety_checker: 'false'
    CreateRequestResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - IN_QUEUE
            - IN_PROGRESS
            - COMPLETED
            - FAILED
            - CANCELLED
        request_id:
          type: string
          minLength: 21
          maxLength: 21
        response_url:
          type: string
          format: uri
        status_url:
          type: string
          format: uri
        cancel_url:
          type: string
          format: uri
        logs:
          type: string
        metrics:
          type: object
          properties:
            inference_time:
              type: number
        queue_position:
          type: number
      required:
        - status
        - request_id
        - response_url
        - status_url
        - cancel_url
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        statusCode:
          type: number
        details: {}
      required:
        - error
        - message
        - statusCode
  responses:
    BadRequest:
      description: Invalid input or request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InsufficientBalance:
      description: Insufficient balance for request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use the format: Key modelrunner_key'

````