openapi: 3.0.3 info: title: Cartesia Agents Knowledge Base API description: 'The Cartesia REST API for real-time voice AI - text-to-speech and voice-changer generation (single-shot bytes or Server-Sent Events), batch speech-to-text transcription, voice management and cloning, audio infill, custom datasets, pronunciation dictionaries, API keys and scoped access tokens, the Voice Agents platform (agents, calls, call batches, phone numbers, telephony providers, webhooks, deployments, knowledge base documents/folders, and evaluation metrics), and usage reporting. All requests require a `Cartesia-Version` header and an `Authorization: Bearer` API key (`sk_car_...`) or short-lived access token. The lowest-latency, streaming surface for TTS and STT is a separate WebSocket protocol documented in the companion AsyncAPI document at asyncapi/cartesia-ai-asyncapi.yml.' version: '2026-03-01' contact: name: Cartesia url: https://cartesia.ai license: name: API documentation - Cartesia Terms of Service url: https://cartesia.ai/terms-of-service servers: - url: https://api.cartesia.ai description: Cartesia production API security: - bearerAuth: [] tags: - name: Knowledge Base description: Documents and folders used by agents. paths: /documents: get: operationId: listDocuments tags: - Knowledge Base summary: List Documents description: List all knowledge base documents in your organization. parameters: - $ref: '#/components/parameters/CartesiaVersion' responses: '200': description: A page of documents. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Document' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createDocument tags: - Knowledge Base summary: Create Document parameters: - $ref: '#/components/parameters/CartesiaVersion' requestBody: required: true content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary folder_id: type: string responses: '200': description: The created document. content: application/json: schema: $ref: '#/components/schemas/Document' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /documents/bulk: post: operationId: bulkCreateDocuments tags: - Knowledge Base summary: Bulk Create Documents description: Upload up to 100 knowledge base documents in a single request. parameters: - $ref: '#/components/parameters/CartesiaVersion' requestBody: required: true content: multipart/form-data: schema: type: object properties: files: type: array items: type: string format: binary folder_id: type: string responses: '200': description: The created documents. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Document' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /documents/{id}: parameters: - name: id in: path required: true description: The ID of the document. schema: type: string get: operationId: getDocument tags: - Knowledge Base summary: Get Document parameters: - $ref: '#/components/parameters/CartesiaVersion' responses: '200': description: The requested document. content: application/json: schema: $ref: '#/components/schemas/Document' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateDocument tags: - Knowledge Base summary: Update Document parameters: - $ref: '#/components/parameters/CartesiaVersion' requestBody: content: application/json: schema: type: object properties: folder_id: type: string responses: '200': description: The updated document. content: application/json: schema: $ref: '#/components/schemas/Document' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteDocument tags: - Knowledge Base summary: Delete Document parameters: - $ref: '#/components/parameters/CartesiaVersion' responses: '200': description: Deletion confirmation. content: application/json: schema: $ref: '#/components/schemas/DeleteResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /folders: get: operationId: listFolders tags: - Knowledge Base summary: List Folders parameters: - $ref: '#/components/parameters/CartesiaVersion' responses: '200': description: A page of folders. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Folder' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createFolder tags: - Knowledge Base summary: Create Folder parameters: - $ref: '#/components/parameters/CartesiaVersion' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string parent_folder_id: type: string responses: '200': description: The created folder. content: application/json: schema: $ref: '#/components/schemas/Folder' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /folders/{id}: parameters: - name: id in: path required: true description: The ID of the folder. schema: type: string get: operationId: getFolder tags: - Knowledge Base summary: Get Folder parameters: - $ref: '#/components/parameters/CartesiaVersion' responses: '200': description: The requested folder. content: application/json: schema: $ref: '#/components/schemas/Folder' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateFolder tags: - Knowledge Base summary: Update Folder parameters: - $ref: '#/components/parameters/CartesiaVersion' requestBody: content: application/json: schema: type: object properties: name: type: string parent_folder_id: type: string responses: '200': description: The updated folder. content: application/json: schema: $ref: '#/components/schemas/Folder' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteFolder tags: - Knowledge Base summary: Delete Folder parameters: - $ref: '#/components/parameters/CartesiaVersion' responses: '200': description: Deletion confirmation. content: application/json: schema: $ref: '#/components/schemas/DeleteResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: schemas: Folder: type: object properties: id: type: string name: type: string parent_folder_id: type: string nullable: true created_at: type: string format: date-time DeleteResponse: type: object properties: id: type: string deleted: type: boolean Document: type: object properties: id: type: string name: type: string folder_id: type: string nullable: true size_bytes: type: integer created_at: type: string format: date-time Error: type: object properties: title: type: string message: type: string error_code: type: string status_code: type: integer doc_url: type: string request_id: type: string responses: Unauthorized: description: Missing, invalid, or expired API key / access token. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' ValidationError: description: The request payload failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' parameters: CartesiaVersion: name: Cartesia-Version in: header required: true description: API version date, e.g. 2026-03-01. schema: type: string example: '2026-03-01' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: sk_car_... API key or short-lived access token description: 'Cartesia API key (sk_car_...) or a short-lived access token minted via POST /access-token, passed as Authorization: Bearer . Every request also requires the Cartesia-Version header.'