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 anhttptool 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'sexecute.body_mode: multipartfor form-data endpoints and itsoutput_mappingto 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
- 201
- 400
- 401
- 404
- 409
- 502
Converter created.
The request was malformed or failed validation.
Missing or invalid credentials.
The resource does not exist (existence is not leaked).
The request conflicts with the resource's current state.
The upstream runtime could not complete the operation.