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.