Overview
What the API does, how a job runs, your keys and the basics.
The FoodShot Partner API is for marketplaces, delivery apps and online menus: you send a photo of a dish and a style, and get back a finished food photo for your listing.
How it works
- Call
POST /v1/generationswith the photo, astyle_idand anIdempotency-Key. You get a generation id back, usually within seconds. - A
generation.succeededwebhook tells you when the image is ready, or you pollGET /v1/generations/{id}. Our objective is about 30-40 seconds once a job starts. - Download
output.urlfrom your server and keep your own copy. The link works for 24 hours.
If a job fails, its credit is refunded automatically.
Keys
Send your key as a Bearer token in the Authorization header:
curl https://api.foodshot.ai/v1/account \
-H "Authorization: Bearer $FOODSHOT_API_KEY"| Test | Live | |
|---|---|---|
| Key starts with | fs_test_ | fs_live_ |
| Results | Sample images marked SAMPLE | Real results from your photos |
| Credits | Never used | 1 per finished image |
- A new key is shown once in the dashboard: store it in a secret manager or an environment variable.
- Live keys work only from your server: a browser gets
403 permission_denied. - Each key sees only its own environment.
- Keys don't expire: to replace one, create a new key, deploy it, then revoke the old one.
Build with a test key, then switch to a live key. See Testing and going live.
Basics
- Base URL:
https://api.foodshot.ai. Every path starts with/v1. - Format: JSON in and out,
snake_casenames, UTC timestamps. - Help: every response has a
FoodShot-Request-Idheader. Send it to us when you ask for help.
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/generations | Create a generation from a photo |
GET /v1/generations/{id} | Get a generation and its result |
GET /v1/generations | List your generations |
GET /v1/styles | List the styles |
GET /v1/account | Credits, limits and usage |
GET /v1/health | 200 when the API is healthy, 503 otherwise. No key needed. |
Every field is in the API reference, made from our OpenAPI file.
About the results
- Marked as AI-generated. Results carry an invisible AI watermark and an AI label in their metadata.
- Review before you publish. Styles are made to keep the dish unchanged, but small details can differ.
- Yours to use. You and your vendors may use results commercially. See the API Terms.