Skip to main content

Create a converter

POST 

/v1/projects/:project_id/knowledge/converters

Register a converter for a media type the platform cannot extract natively, so files of that type become ingestable documents like any other. A converter maps a content_type glob (image/*, audio/mpeg, …) onto one of two workers:

  • an agent (agent_id) — the file is handed to a multimodal model with a fixed "extract all the text" instruction and its answer becomes the document text. The shortest path for images and scanned PDFs; nothing to map.

  • a tool (tool_id) — the file is passed to an http tool as { content_type, filename, data_base64 }, and whatever string the tool returns becomes the document text. The path for dedicated non-chat APIs (speech-to-text, a specialist OCR engine); use the tool's execute.body_mode: multipart for form-data endpoints and its output_mapping to reduce a JSON response to the bare string.

Exactly one of agent_id / tool_id, and one converter per content_type in a project.

Request

Responses

Converter created.