Generate ad images at an aspect ratio
Queues the generation of 1 to 4 ad images at a placement’s aspect ratio (1:1, 4:5, 9:16 or 1.91:1), conditioned on a product’s images and details or a reference image when given. Each finished image is saved to the company’s DAM, tagged ai-generated and ads, and its DAM URL can be used as a launch’s image_url. Poll the generation with GET; results are kept for an hour. Generation is billed to the company’s AI gateway key. Requires a company admin with media.update.
curl --request POST \
--url https://api.fluid.app/api/v202506/company/ads/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "The fall mug on a cafe table in morning light",
"aspect_ratio": "4:5",
"product_id": 12,
"count": 2
}
'import requests
url = "https://api.fluid.app/api/v202506/company/ads/images"
payload = {
"prompt": "The fall mug on a cafe table in morning light",
"aspect_ratio": "4:5",
"product_id": 12,
"count": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'The fall mug on a cafe table in morning light',
aspect_ratio: '4:5',
product_id: 12,
count: 2
})
};
fetch('https://api.fluid.app/api/v202506/company/ads/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v202506/company/ads/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'The fall mug on a cafe table in morning light',
'aspect_ratio' => '4:5',
'product_id' => 12,
'count' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v202506/company/ads/images"
payload := strings.NewReader("{\n \"prompt\": \"The fall mug on a cafe table in morning light\",\n \"aspect_ratio\": \"4:5\",\n \"product_id\": 12,\n \"count\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/v202506/company/ads/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"The fall mug on a cafe table in morning light\",\n \"aspect_ratio\": \"4:5\",\n \"product_id\": 12,\n \"count\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v202506/company/ads/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"The fall mug on a cafe table in morning light\",\n \"aspect_ratio\": \"4:5\",\n \"product_id\": 12,\n \"count\": 2\n}"
response = http.request(request)
puts response.read_body{
"generation": {
"id": "6f1c2a9e-3b4d-4e5f-8a7b-9c0d1e2f3a4b",
"status": "pending"
},
"status": 202,
"meta": {
"request_id": "4e8a2c6f-1b9d-4f3a-a7e5-0c2d8b6f1a93",
"timestamp": "2026-10-22T18:10:00Z"
}
}{
"message": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The scene to generate.
20001:1 feed, 4:5 Instagram and Facebook feed, 9:16 Stories and Reels, 1.91:1 link and landscape placements.
1:1, 4:5, 9:16, 1.91:1 Optional. A product of this company whose images and details the images are based on.
Optional https image to base the images on.
1 <= x <= 4curl --request POST \
--url https://api.fluid.app/api/v202506/company/ads/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "The fall mug on a cafe table in morning light",
"aspect_ratio": "4:5",
"product_id": 12,
"count": 2
}
'import requests
url = "https://api.fluid.app/api/v202506/company/ads/images"
payload = {
"prompt": "The fall mug on a cafe table in morning light",
"aspect_ratio": "4:5",
"product_id": 12,
"count": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'The fall mug on a cafe table in morning light',
aspect_ratio: '4:5',
product_id: 12,
count: 2
})
};
fetch('https://api.fluid.app/api/v202506/company/ads/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v202506/company/ads/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'The fall mug on a cafe table in morning light',
'aspect_ratio' => '4:5',
'product_id' => 12,
'count' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v202506/company/ads/images"
payload := strings.NewReader("{\n \"prompt\": \"The fall mug on a cafe table in morning light\",\n \"aspect_ratio\": \"4:5\",\n \"product_id\": 12,\n \"count\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/v202506/company/ads/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"The fall mug on a cafe table in morning light\",\n \"aspect_ratio\": \"4:5\",\n \"product_id\": 12,\n \"count\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v202506/company/ads/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"The fall mug on a cafe table in morning light\",\n \"aspect_ratio\": \"4:5\",\n \"product_id\": 12,\n \"count\": 2\n}"
response = http.request(request)
puts response.read_body{
"generation": {
"id": "6f1c2a9e-3b4d-4e5f-8a7b-9c0d1e2f3a4b",
"status": "pending"
},
"status": 202,
"meta": {
"request_id": "4e8a2c6f-1b9d-4f3a-a7e5-0c2d8b6f1a93",
"timestamp": "2026-10-22T18:10:00Z"
}
}{
"message": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}