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

# Create drawing

> Create a drawing from an uploaded file.

Create a drawing from a file you've already uploaded via [`POST /files`](/cms-api/files/create). The file must be a PDF.

This starts a `drawing.preprocess` job that extracts [sheets](/cms-api/resources/sheets) and detects [blocks](/cms-api/resources/blocks) on each sheet. Processing consumes **1 credit per sheet** extracted.

## What happens

1. A `drawing.preprocess` job is created
2. Sheets are extracted from the PDF
3. Each sheet is analyzed to detect blocks (plans, details, title blocks, etc.)
4. OCR and metadata extraction runs on each block

Poll [`GET /jobs/{id}`](/vision-api/jobs/get) to track progress. Processing time depends on the number of pages.


## OpenAPI

````yaml POST /drawings
openapi: 3.1.0
info:
  title: Bedrock API
  version: 1.0.0
  description: >-
    REST API for construction document management and computer vision
    intelligence.
  contact:
    name: Bedrock Support
    url: https://bedrock.cv
    email: support@bedrock.cv
servers:
  - url: https://api.bedrock.cv
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /drawings:
    post:
      tags:
        - CMS
      summary: Create drawing
      description: Upload a drawing file to a project.
      operationId: createDrawing
      parameters:
        - $ref: '#/components/parameters/ApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDrawingRequest'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DrawingSummary'
              example:
                data:
                  id: drw_01JABCD123
                  project_id: prj_01JABCD123
                  filename: A101-floor-plans.pdf
                  name: A101 Floor Plans
                  uri: >-
                    gs://bedrock-files/projects/prj_01JABCD123/drawings/A101-floor-plans.pdf
                  created_at: '2024-06-16T14:00:00Z'
                  updated_at: '2024-06-16T14:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ApiVersionHeader:
      name: X-API-Version
      in: header
      required: false
      schema:
        type: string
        default: '2026-01-01'
      description: API version
  schemas:
    CreateDrawingRequest:
      type: object
      properties:
        file_id:
          type: string
        name:
          type: string
      required:
        - file_id
      example:
        file_id: projects%2Fprj_01JABCD123%2Ffiles%2FA101-floor-plans.pdf
        name: A101 Floor Plans
    DrawingSummary:
      type: object
      properties:
        id:
          type: string
        project_id:
          type: string
        filename:
          type: string
        name:
          type: string
          nullable: true
        uri:
          type: string
        hash:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - project_id
        - filename
        - name
        - uri
        - hash
        - created_at
        - updated_at
      example:
        id: drw_01JABCD123
        project_id: prj_01JABCD123
        filename: A101-floor-plans.pdf
        name: A101 Floor Plans
        uri: >-
          gs://bedrock-files/projects/prj_01JABCD123/drawings/A101-floor-plans.pdf
        created_at: '2024-06-16T14:00:00Z'
        updated_at: '2024-06-16T14:00:00Z'
    ApiError:
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        code:
          type: string
        request_id:
          type: string
        instance:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - type
        - title
        - status
        - detail
      example:
        type: https://docs.bedrock.cv/errors/bad-request
        title: Bad Request
        status: 400
        detail: One or more request fields are invalid.
        instance: /projects
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: https://docs.bedrock.cv/errors/bad-request
            title: Bad Request
            status: 400
            detail: One or more request fields are invalid.
            code: VALIDATION_ERROR
            request_id: req_01JABCD123
            errors:
              project_id:
                - Required field
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: https://docs.bedrock.cv/errors/authentication
            title: Unauthorized
            status: 401
            detail: Invalid or missing API key.
            code: UNAUTHORIZED
            request_id: req_01JABCD123
    RateLimited:
      description: Rate limited
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: https://docs.bedrock.cv/errors/rate-limit
            title: Rate limited
            status: 429
            detail: Rate limit exceeded. Try again in 60 seconds.
            code: RATE_LIMITED
            request_id: req_01JABCD123
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key prefixed with `sk_`. Example: `Authorization: Bearer sk_xxx`'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````