FocalAPI Docs

Quickstart

Make your first FocalAPI request with a creative model

This guide uses image generation to introduce FocalAPI. Create an API key in the console, then use GET /v1/models and the model catalog to confirm what your key can use.

1. List available models

curl https://api.focalapi.com/v1/models \
  -H "Authorization: Bearer $FOCALAPI_KEY"

Use only model IDs returned by this endpoint. Visible models, accepted parameters, and prices can differ by user group.

2. Generate an image

This example uses Seedream 5.0 Pro. If it is not in your model list, replace it with an available image model.

curl https://api.focalapi.com/v1/images/generations \
  -H "Authorization: Bearer $FOCALAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-pro-260628",
    "prompt": "A cinematic lighthouse by the sea at dawn, soft blue and gold light",
    "size": "1024x1024",
    "n": 1
  }'

The response returns an image URL or base64 data depending on the model and request parameters.

3. Create a video task

Video is asynchronous: create a task, poll its status, then download the asset.

curl https://api.focalapi.com/v1/video/generations \
  -H "Authorization: Bearer $FOCALAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-mini-260615",
    "prompt": "A slow camera push through a rainy neon city street",
    "duration": 5,
    "size": "1280x720"
  }'

Use GET /v1/video/generations/{task_id} to poll the returned task_id. See the video task guide for the full lifecycle.

Next steps

On this page