You're getting this error:
{
"detail": [
{
"type": "missing",
"loc": [
"body",
"file"
],
"msg": "Field required",
"input": null
}
]
}Cause: You're using the wrong endpoint!
There are TWO different endpoints for image processing:
POST /transcribe-image
- Expects: File upload (form-data)
- Body Type:
multipart/form-data - Use when: You have a local image file to upload
POST /transcribe-image-url
- Expects: JSON with URL
- Body Type:
application/json - Use when: You have an image URL (like your iStock image)
POST http://localhost:8000/transcribe-image-url
Content-Type: application/json
Accept: application/json
{
"url": "https://media.istockphoto.com/id/1468298683/pt/foto/mother-and-her-two-children-boy-and-girl-relaxing-in-nature-grass-field-watching-the-sunset.jpg?s=2048x2048&w=is&k=20&c=7wMm1zEerJCW3xDdm2gwovcdTBeU7DeayHEaYDNsJBI="
}-
Check your URL bar in Postman
- ❌ If it shows:
http://localhost:8000/transcribe-image - ✅ Change it to:
http://localhost:8000/transcribe-image-url
- ❌ If it shows:
-
Check your Body tab
- ✅ Select "raw"
- ✅ Select "JSON" from dropdown
- ✅ Paste the JSON above
-
Check Headers
- ✅
Content-Type: application/json
- ✅
POST /transcribe-image
Body: form-data
- Key: file
- Type: File
- Value: [upload file]
POST /transcribe-image-url
Body: raw (JSON)
{
"url": "your-image-url"
}
POST /transcribe-image
Content-Type: multipart/form-data
Body: form-data with file upload
POST /transcribe-image-url
Content-Type: application/json
Body: {"url": "..."}
When you use the correct endpoint, you'll get:
{
"file_id": "uuid",
"file_info": {
"name": "family_sunset.jpg",
"extension": ".jpg",
"size_mb": 0.34,
"mime_type": "image/jpeg",
"url": "your-image-url"
},
"success": true,
"error": null,
"title": "Family Enjoying a Sunny Day in a Field",
"description": "Detailed description...",
"extracted_text": "iStock Credit: kieferpix...",
"processor_used": "OpenAI Vision",
"processing_time": 6.4,
"timestamp": "2025-09-23T14:19:52"
}| Endpoint | Use Case | Body Type | Content-Type |
|---|---|---|---|
/transcribe-image |
Local file upload | form-data | multipart/form-data |
/transcribe-image-url |
Image from URL | JSON | application/json |
Your case: Use /transcribe-image-url with JSON body! 🎯