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

# Create Job

> Submit a quantum job to the specified device.

**Request Body:**
- **program** (object, required): Quantum program with format and data fields
- **shots** (integer, required): Number of shots to execute
- **deviceQrn** (string, required): Device QRN (qBraid Resource Name)
- **runtimeOptions** (object, optional): Runtime options
- **tags** (object, optional): Job tags
- **name** (string, optional): Job name

**Headers:**
- **X-API-KEY** (string, required): Your qBraid API key

**Returns:**
- Object containing the new job QRN and initial status

**Raises:**
- **422**: Validation error if required fields are missing or invalid

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "data": {
      "jobQrn": "aws:aws:sim:dm1-a1b2-qjob-1234567890abcdef",
      "status": "INITIALIZING"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml post /jobs
openapi: 3.1.0
info:
  title: qBraid Runtime API
  description: FastAPI backend powering qBraid's quantum runtime microservice.
  version: '2'
servers:
  - url: https://api-v2.qbraid.com/api/v1
    description: Live Server
security:
  - ApiKeyAuth: []
paths:
  /jobs:
    post:
      tags:
        - jobs
      summary: Create Job
      description: >-
        Submit a quantum job to the specified device.


        **Request Body:**

        - **program** (object, required): Quantum program with format and data
        fields

        - **shots** (integer, required): Number of shots to execute

        - **deviceQrn** (string, required): Device QRN (qBraid Resource Name)

        - **runtimeOptions** (object, optional): Runtime options

        - **tags** (object, optional): Job tags

        - **name** (string, optional): Job name


        **Headers:**

        - **X-API-KEY** (string, required): Your qBraid API key


        **Returns:**

        - Object containing the new job QRN and initial status


        **Raises:**

        - **422**: Validation error if required fields are missing or invalid
      operationId: create_job_jobs_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    JobRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Job name
        shots:
          type: integer
          exclusiveMinimum: 0
          title: Shots
          description: Number of shots to execute
        deviceQrn:
          type: string
          title: Deviceqrn
          description: qBraid device resource name
        tags:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: boolean
          type: object
          title: Tags
          description: Job tags
        runtimeOptions:
          additionalProperties: true
          type: object
          title: Runtimeoptions
          description: Runtime options
        program:
          $ref: '#/components/schemas/Program'
      type: object
      required:
        - shots
        - deviceQrn
        - program
      title: JobRequest
      description: Schema for job submission request body
    CreateJobResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the job was created successfully
        data:
          type: object
          properties:
            jobQrn:
              type: string
              description: QRN of the newly created job
              example: aws:aws:sim:dm1-a1b2-qjob-1234567890abcdef
            status:
              type: string
              description: Initial job status
              example: INITIALIZING
          required:
            - jobQrn
            - status
      type: object
      required:
        - success
        - data
      title: CreateJobResponse
      description: Response schema for job creation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Program:
      properties:
        format:
          type: string
          enum:
            - qasm2
            - qasm3
            - qir.bc
            - qir.ll
            - analog
            - pulser.sequence
            - quil
            - ionq.circuit.v0
            - problem
          title: Format
          description: Program format
        data:
          title: Data
          description: Program data
      type: object
      required:
        - format
        - data
      title: Program
      description: Schema for quantum program
    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:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Authenticate requests using an API key linked to your qBraid account.
        Obtain your key by registering or logging in at
        [account.qbraid.com](https://account.qbraid.com).

````