Skip to main content
POST
/
v1
/
content
/
gif
Generate a GIF
curl --request POST \
  --url https://brew.new/api/v1/content/gif \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": "prompt",
  "prompt": "<string>",
  "duration": 5,
  "fps": 12,
  "loop": true
}
'
{
  "gifUrl": "<string>",
  "videoUrl": "<string>",
  "altText": "<string>",
  "duration": 123,
  "fps": 123,
  "aspectRatio": "<string>",
  "loop": true
}

Authorizations

Authorization
string
header
default:Bearer brew_your_api_key
required

Send your Brew API key as Authorization: Bearer brew_xxx.

Headers

Idempotency-Key
string

Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.

Required string length: 1 - 100

Body

application/json

A from discriminator: { from:"prompt", prompt, … }, { from:"image", imageUrl, … }, or { from:"video", videoUrl, … }.

from
enum<string>
required
Available options:
prompt
prompt
string
required
Required string length: 1 - 2000
duration
integer
Required range: 1 <= x <= 10
fps
integer
Required range: 1 <= x <= 24
aspectRatio
enum<string>
Available options:
16:9,
4:3,
1:1,
3:4,
9:16,
21:9,
9:21
loop
boolean

Response

The operation result.

gifUrl
string<uri>
required
videoUrl
string<uri>
altText
string
duration
number
fps
number
aspectRatio
string
loop
boolean