From 02df22681eebbc2003eff711978862a62f70070f Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 1 Apr 2026 17:38:30 -0700 Subject: [PATCH] =?UTF-8?q?docs:=20address=20review=20comments=20=E2=80=94?= =?UTF-8?q?=20consistent=20field=20names,=20input=5Ffiles=20key,=20cross-r?= =?UTF-8?q?eferences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix field name mismatch: use 'cover_image' in curl examples to match Python model - Change 'inputFiles' to 'input_files' (snake_case) for Python API convention - Add note that Option 3 is an alternative to multipart upload - Add Platform API documentation reference for /files endpoint - Add cross-reference from files.mdx to flows.mdx file inputs section Co-Authored-By: Claude Opus 4.5 --- docs/en/concepts/files.mdx | 2 +- docs/en/concepts/flows.mdx | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/en/concepts/files.mdx b/docs/en/concepts/files.mdx index 54d91914e..2629c66c6 100644 --- a/docs/en/concepts/files.mdx +++ b/docs/en/concepts/files.mdx @@ -135,7 +135,7 @@ result = flow.kickoff( ``` -When deployed on CrewAI Platform, `ImageFile`, `PDFFile`, and other file-typed fields in your flow state automatically get a file upload UI. Users can drag and drop files directly in the Platform interface. Files are stored securely and passed to agents using provider-specific optimizations (inline base64, file upload APIs, or URL references depending on the provider). +When deployed on CrewAI Platform, `ImageFile`, `PDFFile`, and other file-typed fields in your flow state automatically get a file upload UI. Users can drag and drop files directly in the Platform interface. Files are stored securely and passed to agents using provider-specific optimizations (inline base64, file upload APIs, or URL references depending on the provider). For API usage examples, see [File Inputs in Flows](/concepts/flows#file-inputs). ### With Standalone Agents diff --git a/docs/en/concepts/flows.mdx b/docs/en/concepts/flows.mdx index 54c1e6d82..f8ff211cd 100644 --- a/docs/en/concepts/flows.mdx +++ b/docs/en/concepts/flows.mdx @@ -384,7 +384,7 @@ Send files directly with the kickoff request: curl -X POST https://your-deployment.crewai.com/kickoff \ -H 'Authorization: Bearer YOUR_TOKEN' \ -F 'inputs={"company_name": "Einstein"}' \ - -F 'cnh_image=@/path/to/document.jpg' + -F 'cover_image=@/path/to/photo.jpg' ``` Files are automatically stored and converted to `FileInput` objects. The agent receives the file with provider-specific optimization (inline base64, file upload API, or URL reference depending on the LLM provider). @@ -401,23 +401,25 @@ curl -X POST https://your-deployment.crewai.com/kickoff \ #### Option 3: Separate upload + kickoff -Upload files first, then reference them: +This is an alternative to multipart upload when you need to upload files separately from the kickoff request. Upload files first, then reference them by URL: ```bash # Step 1: Upload curl -X POST https://your-deployment.crewai.com/files \ -H 'Authorization: Bearer YOUR_TOKEN' \ - -F 'file=@/path/to/document.jpg' \ - -F 'field_name=cnh_image' -# Returns: {"url": "https://...", "field_name": "cnh_image"} + -F 'file=@/path/to/photo.jpg' \ + -F 'field_name=cover_image' +# Returns: {"url": "https://...", "field_name": "cover_image"} # Step 2: Kickoff with URL curl -X POST https://your-deployment.crewai.com/kickoff \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ - -d '{"inputs": {"company_name": "Einstein"}, "inputFiles": {"cnh_image": "https://..."}}' + -d '{"inputs": {"company_name": "Einstein"}, "input_files": {"cover_image": "https://..."}}' ``` +See the Platform API documentation for full `/files` endpoint details. + #### On CrewAI Platform When using the Platform UI, file-typed fields automatically render as drag-and-drop upload zones. No API calls needed—just drop the file and click Run.