API
Images & video
Generate images and videos with the BytePlus models Valefront sells (Seedream for images, Seedance for video), with the same key as chat. Each one is charged at the provider's official price, from your credit.
Images
POST https://llm.valefront.com/v1/images/generations with the model, a prompt and, optionally, size (for example 1024x1024), n (1 to 4) and response_format (url or b64_json).
curl https://llm.valefront.com/v1/images/generations \
-H "Authorization: Bearer $VALEFRONT_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"seedream-4-0-250828","prompt":"A single green leaf on a white background","size":"1024x1024"}'
The answer lists the images and what they cost:
{"created":1793927400,"model":"seedream-4-0-250828","provider":"BytePlus",
"data":[{"url":"https://…"}],"cost":0.03,"usage":{"images":1}}
Image links are temporary: download what you want to keep.
Video
A video takes 30 seconds to a few minutes, so it is a job: start it, then check it until it is finished.
POST https://llm.valefront.com/v1/videos with the model, a prompt and, optionally, duration (seconds), resolution (480p, 720p, or 1080p where the model offers it) and ratio (for example 16:9):
curl https://llm.valefront.com/v1/videos \
-H "Authorization: Bearer $VALEFRONT_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"seedance-1-0-pro-fast-251015","prompt":"Gentle ocean waves at sunrise","duration":5,"resolution":"720p"}'
It answers 202 with the job:
{"id":"video_2274b71f…","object":"video","status":"queued","model":"seedance-1-0-pro-fast-251015","duration":5,"resolution":"720p"}
Then check it with GET /v1/videos/{id} (every few seconds) until status is succeeded or failed:
curl https://llm.valefront.com/v1/videos/video_2274b71f… \
-H "Authorization: Bearer $VALEFRONT_KEY"
{"id":"video_2274b71f…","status":"succeeded","url":"https://…mp4","cost":0.103818}
Only the key that started a video can read it.
Prices and billing
- Images are priced per image; videos per million tokens of the finished video, by resolution. See Models & pricing or the
medialist in /v1/pricing. - A video is charged once, when it has finished, by the tokens it actually used. A failed video costs nothing.
- Images and video are paid from your credit; free tokens cover chat only.
- Name the model exactly; the list of image and video models is in
/v1/pricing.
Try it without code
The Playground on the dashboard has Image and Video tabs: pick a model, write a prompt, see the price before you generate.