openapi: 3.2.0 info: title: Kit for AI — API Playground Convert API version: 1.0.0 description: Welcome to the **Kit for AI** API playground. contact: name: Kit for AI url: https://kitforai.com servers: - url: https://kitforai.com security: - apiKey: [] tags: - name: Convert paths: /api/v1/convert: post: summary: Convert a document or URL description: Provide either a `file` (PDF, Word, Excel, PowerPoint, CSV, HTML, image, text) or a `url`, and receive Markdown — or structured JSON when outputFormat=json. Rate limited per key by plan. operationId: convertDocument requestBody: required: true content: multipart/form-data: schema: type: object description: Provide exactly one of `file` or `url`. properties: file: type: string format: binary description: The document to convert url: type: string description: A web page or document URL to fetch and convert outputFormat: type: string enum: - markdown - json default: markdown jsonSchema: type: string description: Optional JSON schema (stringified) describing fields to extract when outputFormat=json deepExtract: type: boolean description: 'Paid plans: OCR cleanup, table normalization, and figure descriptions' knowledgeBaseId: type: string description: 'Optional: attach the converted document to this knowledge base in one call (convert → attach). Must be a knowledge base you own; returned as `data.knowledgeBaseId` when attached.' responses: '201': description: Converted content: application/json: schema: $ref: '#/components/schemas/ConvertResponse' '401': description: Missing or invalid API key content: application/json: schema: $ref: '#/components/schemas/Error' '422': description: Unsupported file or invalid input content: application/json: schema: $ref: '#/components/schemas/Error' '429': description: Rate limit or monthly quota reached content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Convert components: schemas: Error: type: object properties: error: type: object properties: code: type: string endUserMessage: type: string ConvertResponse: type: object properties: data: type: object properties: id: type: string status: type: string enum: - completed - failed cached: type: boolean markdown: type: - string - 'null' json: type: - object - 'null' securitySchemes: apiKey: type: apiKey in: header name: x-api-key