Dedalus Labs OCR API

The OCR API from Dedalus Labs — 1 operation(s) for ocr.

OpenAPI Specification

dedaluslabs-ocr-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Dedalus Audio OCR API
  description: 'MCP gateway for AI agents. Mix-and-match any model with any tool from our marketplace.


    ## Authentication

    Use Bearer token or X-API-Key header authentication:

    ```

    Authorization: Bearer your-api-key-here

    ```

    ```

    x-api-key: your-api-key-here

    ```


    ## Available Endpoints

    - **GET /v1/models**: list available models

    - **POST /v1/chat/completions**: Chat completions with MCP tools

    - **GET /health**: Service health check'
  version: 0.0.1
servers:
- url: https://api.dedaluslabs.ai
  description: Official Dedalus API
tags:
- name: OCR
paths:
  /v1/ocr:
    post:
      tags:
      - OCR
      summary: Process Ocr
      description: 'Process a document through Mistral OCR.


        Extracts text from PDFs and images, returning markdown-formatted content.'
      operationId: process_ocr_v1_ocr_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OCRRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OCRResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - Bearer: []
      x-codeSamples:
      - lang: python
        label: Python
        source: 'client = Dedalus()


          result = client.ocr.process(**params)'
components:
  schemas:
    OCRRequest:
      properties:
        model:
          type: string
          title: Model
          default: mistral-ocr-latest
        document:
          $ref: '#/components/schemas/OCRDocument'
      type: object
      required:
      - document
      title: OCRRequest
      description: OCR request schema.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OCRDocument:
      properties:
        type:
          type: string
          title: Type
          default: document_url
        document_url:
          type: string
          title: Document Url
          description: Data URI with base64-encoded document
      type: object
      required:
      - document_url
      title: OCRDocument
      description: Document input for OCR.
    OCRPage:
      properties:
        index:
          type: integer
          title: Index
        markdown:
          type: string
          title: Markdown
      type: object
      required:
      - index
      - markdown
      title: OCRPage
      description: Single page OCR result.
    OCRResponse:
      properties:
        pages:
          items:
            $ref: '#/components/schemas/OCRPage'
          type: array
          title: Pages
        model:
          type: string
          title: Model
        usage:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Usage
      type: object
      required:
      - pages
      - model
      title: OCRResponse
      description: OCR response schema.
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer