mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-13 14:32:47 +00:00
docs: Update file upload API to use unified /kickoff endpoint
The /kickoff endpoint now auto-detects content type: - JSON body for normal kickoff - multipart/form-data for file uploads Removed references to separate /kickoff/multipart endpoint. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -366,8 +366,10 @@ class OnboardingFlow(Flow[OnboardingState]):
|
||||
When deployed on **CrewAI Platform**, file-typed fields automatically render as file upload dropzones in the UI. Users can drag and drop files, which are then passed to your flow.
|
||||
|
||||
**Kicking off with files via API:**
|
||||
- **Multipart**: `POST /kickoff/multipart` with files embedded in the request
|
||||
- **Separate upload**: `POST /files` first to upload files, then `POST /kickoff` with the returned URLs
|
||||
|
||||
The `/kickoff` endpoint auto-detects the request format:
|
||||
- **JSON body** → normal kickoff
|
||||
- **multipart/form-data** → file upload + kickoff
|
||||
|
||||
API users can also pass URL strings directly to file-typed fields—Pydantic coerces them automatically.
|
||||
|
||||
@@ -378,7 +380,8 @@ API users can also pass URL strings directly to file-typed fields—Pydantic coe
|
||||
Send files directly with the kickoff request:
|
||||
|
||||
```bash
|
||||
curl -X POST https://your-deployment.crewai.com/kickoff/multipart \
|
||||
# With files (multipart) — same endpoint
|
||||
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'
|
||||
@@ -386,7 +389,17 @@ curl -X POST https://your-deployment.crewai.com/kickoff/multipart \
|
||||
|
||||
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).
|
||||
|
||||
#### Option 2: Separate upload + kickoff
|
||||
#### Option 2: JSON kickoff (no files)
|
||||
|
||||
```bash
|
||||
# Without files (JSON) — same endpoint
|
||||
curl -X POST https://your-deployment.crewai.com/kickoff \
|
||||
-H 'Authorization: Bearer YOUR_TOKEN' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"inputs": {"company_name": "Einstein"}}'
|
||||
```
|
||||
|
||||
#### Option 3: Separate upload + kickoff
|
||||
|
||||
Upload files first, then reference them:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user