Spaces:
Running
Running
File size: 698 Bytes
afb9f60 5c9f0e3 74d6a33 afb9f60 5c9f0e3 afb9f60 5c9f0e3 c54acdc 5c9f0e3 c54acdc 5c9f0e3 c54acdc 5c9f0e3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ---
title: BLIP Image Captioning API
emoji: 🖼️
colorFrom: blue
colorTo: gray
sdk: docker
app_port: 7860
---
# BLIP Image Captioning API
FastAPI service for `Salesforce/blip-image-captioning-large`, packaged for Hugging Face Docker Spaces.
Set a Hugging Face Space secret named `API_KEY` to protect the caption endpoint.
## Endpoints
- `GET /health`
- `POST /caption`
## Example request
```bash
curl -X POST "http://localhost:7860/caption" \
-H "x-api-key: your-secret-key" \
-F "image=@example.jpg" \
-F "min_new_tokens=5" \
-F "max_new_tokens=20"
```
## Local run
```bash
docker build -t blip-large-api .
docker run -p 7860:7860 -e API_KEY=your-secret-key blip-large-api
```
|