API docs › Recipes
Singing ad (jingle)
Describe the product: jingle, sung song, an optional singer from a photo, product photos and an end card.
Upload 1 to 8 product photos (and, optionally, a singer photo you have permission to use) (multipart field "file"). The answer has the input id ("t-…"):
curl -X POST https://photonsphere.ai/api/tools -H "Authorization: Bearer nok_YOUR_KEY" -F "file=@my-file" # → {"id":"t-…","kind":"video|audio|image|text"}Run the tool (credits shown in the app are charged now and refunded if it fails):
curl -X PUT https://photonsphere.ai/api/tools -H "Authorization: Bearer nok_YOUR_KEY" -H "Content-Type: application/json" \ -d '{"input":"","tool":"songad","params":{"product":"Sunny Bakery: sourdough baked every morning","brand":"Sunny Bakery","cta":"Order today","media":["t-PHOTO1","t-PHOTO2"],"performer":"t-SINGER","consent":true,"language":"en"}}' # → {"id":"JOB_ID"}Poll the job, then download the result:
curl https://photonsphere.ai/api/tools/JOB_ID -H "Authorization: Bearer nok_YOUR_KEY" # {"state":"running"|"ready"|"error","progress":0-100} curl -o result.mp4 "https://photonsphere.ai/api/tools/JOB_ID?download=1" -H "Authorization: Bearer nok_YOUR_KEY"
All calls need Authorization: Bearer nok_… (see Authentication). Prices are the same as in the app.