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

# Convert



## OpenAPI

````yaml https://api.aiql.io/openapi.json post /convert
openapi: 3.1.0
info:
  title: aiql-api
  version: 0.1.0
servers:
  - url: https://api.aiql.io
security: []
tags:
  - name: Health
    description: Service health checks.
  - name: Workspaces
    description: Workspace management.
  - name: Ingestions
    description: Document ingestion pipeline.
  - name: Queries
    description: Natural-language queries.
  - name: Sources
    description: Ingested sources and their contents.
  - name: Requests
    description: Source addition/removal requests awaiting review.
  - name: Request Changes
    description: Individual source add/remove changes on a request.
  - name: Request Reviews
    description: Reviews of a request, including draft and submit.
  - name: Request Comments
    description: Comments on a request review.
  - name: Canvases
    description: Brainstorm canvases.
  - name: Dashboards
    description: Dashboards.
  - name: Presentations
    description: Slide presentations.
  - name: Tools
    description: Standalone convert/split/shape/extract tools.
  - name: Connectors
    description: Connector catalog and connect flows.
  - name: Connections
    description: Workspace connector connections.
paths:
  /convert:
    post:
      tags:
        - Tools
      summary: Convert
      operationId: convert_convert_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                title: Response Convert Convert Post
        '401':
          description: 'Authentication failed: missing or invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST https://api.aiql.io/convert \
              -H "Authorization: Bearer $AIQL_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"url": "https://example.com/report.pdf"}'
        - lang: python
          label: Python SDK
          source: >-
            import os

            from aiql import AiQL


            client = AiQL(api_key=os.environ["AIQL_API_KEY"])


            markdown =
            client.tools.convert(url="https://example.com/report.pdf")
        - lang: typescript
          label: TypeScript SDK
          source: >-
            import { AiQL } from "@aiql.io/sdk";


            const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });


            const markdown = await client.tools.convert({ url:
            "https://example.com/report.pdf" });
components:
  schemas:
    ConvertRequest:
      properties:
        url:
          type: string
          title: Url
          description: >-
            URL of the source to convert. Accepts a file URL of any extension, a
            web page, a YouTube video, or any other URL.
      type: object
      required:
        - url
      title: ConvertRequest
    ErrorResponse:
      type: object
      title: ErrorResponse
      properties:
        detail:
          type: string
          title: Detail
      required:
        - detail
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: API key passed as a Bearer token in the Authorization header.
      scheme: bearer

````