Créer votre première génération
export API_ORIGIN='https://demo.freshapp.ai'
export API_KEY='sk_YOUR_API_KEY'
curl --fail-with-body "$API_ORIGIN/api/v1/generations" \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-1001' \
-d '{"model":"seed-audio-1.0","input":{"prompt":"Un phare sur une falaise à l’aube, mer calme, lumière douce."}}'
# Read it every 5 to 10 seconds until its status ends.
curl --fail-with-body "$API_ORIGIN/api/v1/generations/GENERATION_ID" \
-H "Authorization: Bearer $API_KEY"
# A delivered output's url is a signed link: no key needed.
curl --fail-with-body -o result "OUTPUT_URL"