blip-large / README.md
khushalcodiste's picture
fix: added
c54acdc
---
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
```