Start a creative session (saves the brief and generates drafts with your key)
curl --request POST \
--url https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"title": "<string>",
"objective": "<string>",
"persona": "<string>",
"params": {},
"reference_asset_ids": [
"<string>"
],
"variant_count": 2,
"action_key": "<string>"
}
'import requests
url = "https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions"
payload = {
"prompt": "<string>",
"title": "<string>",
"objective": "<string>",
"persona": "<string>",
"params": {},
"reference_asset_ids": ["<string>"],
"variant_count": 2,
"action_key": "<string>"
}
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: '<string>',
title: '<string>',
objective: '<string>',
persona: '<string>',
params: {},
reference_asset_ids: ['<string>'],
variant_count: 2,
action_key: '<string>'
})
};
fetch('https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions', 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.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions",
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' => '<string>',
'title' => '<string>',
'objective' => '<string>',
'persona' => '<string>',
'params' => [
],
'reference_asset_ids' => [
'<string>'
],
'variant_count' => 2,
'action_key' => '<string>'
]),
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.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"persona\": \"<string>\",\n \"params\": {},\n \"reference_asset_ids\": [\n \"<string>\"\n ],\n \"variant_count\": 2,\n \"action_key\": \"<string>\"\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.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"persona\": \"<string>\",\n \"params\": {},\n \"reference_asset_ids\": [\n \"<string>\"\n ],\n \"variant_count\": 2,\n \"action_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions")
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\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"persona\": \"<string>\",\n \"params\": {},\n \"reference_asset_ids\": [\n \"<string>\"\n ],\n \"variant_count\": 2,\n \"action_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"session": {
"creative_session_id": "<string>",
"campaign_id": "<string>",
"title": "<string>",
"persona": "<string>",
"objective": "<string>",
"prompt": "<string>",
"accumulated_feedback": [
"<string>"
],
"status": "drafting",
"revision": 0,
"session_generation": 0,
"creative_plan": {
"modality": "image",
"format_kind": "image",
"params": {},
"provider_type": "<string>"
},
"flow": [
{
"label": "<string>",
"state": "done",
"summary": "<string>"
}
],
"variants": [
{
"build_variant_id": "<string>",
"name": "<string>",
"direction": "<string>",
"rationale": "<string>",
"quality": "draft",
"status": "draft",
"preview": {
"type": "image",
"url": "<string>"
},
"parent_build_variant_id": "<string>",
"recommended": true,
"score": 123,
"evaluation": [
{
"evaluator_id": "<string>",
"evaluator_version": "<string>",
"category": "readiness",
"code": "<string>",
"label": "<string>",
"stage": "draft",
"status": "pass",
"detail": "<string>",
"severity": "hard",
"blocking": true
}
]
}
],
"format_renders": [
{
"format_id": "<string>"
}
],
"notices": [
{
"code": "variant_count_mismatch",
"severity": "info",
"message": "<string>"
}
],
"engine": {
"engineId": "<string>",
"connectionId": "<string>"
},
"selected_variant_id": "<string>",
"refined_variant_id": "<string>",
"approval": {
"variant_id": "<string>",
"session_revision": 0,
"output_hash": "<string>"
},
"finalization": {
"creative_id": "<string>",
"manifest_id": "<string>",
"sync_status": "<string>",
"summary": "<string>"
},
"truncated": true,
"omitted": [
"<string>"
]
},
"revision": 0,
"sessionGeneration": 0,
"actionId": "<string>",
"status": "submitted",
"leaves": [
{
"leafId": "<string>",
"status": "submitted",
"taskId": "<string>",
"variantIds": [
"<string>"
],
"error": "<string>"
}
],
"funding": {
"fundedBy": "buyer",
"provider": "<string>",
"keySource": "engine_connection",
"connectionId": "<string>",
"credentialId": "<string>"
},
"sessionTruncated": true,
"sessionOmitted": [
"<string>"
]
},
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": "<unknown>"
}
}Creatives
Start a creative session (saves the brief and generates drafts with your key)
POST
/
api
/
v2
/
buyer
/
campaigns
/
{id}
/
creative-sessions
Start a creative session (saves the brief and generates drafts with your key)
curl --request POST \
--url https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"title": "<string>",
"objective": "<string>",
"persona": "<string>",
"params": {},
"reference_asset_ids": [
"<string>"
],
"variant_count": 2,
"action_key": "<string>"
}
'import requests
url = "https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions"
payload = {
"prompt": "<string>",
"title": "<string>",
"objective": "<string>",
"persona": "<string>",
"params": {},
"reference_asset_ids": ["<string>"],
"variant_count": 2,
"action_key": "<string>"
}
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: '<string>',
title: '<string>',
objective: '<string>',
persona: '<string>',
params: {},
reference_asset_ids: ['<string>'],
variant_count: 2,
action_key: '<string>'
})
};
fetch('https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions', 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.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions",
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' => '<string>',
'title' => '<string>',
'objective' => '<string>',
'persona' => '<string>',
'params' => [
],
'reference_asset_ids' => [
'<string>'
],
'variant_count' => 2,
'action_key' => '<string>'
]),
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.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"persona\": \"<string>\",\n \"params\": {},\n \"reference_asset_ids\": [\n \"<string>\"\n ],\n \"variant_count\": 2,\n \"action_key\": \"<string>\"\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.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"persona\": \"<string>\",\n \"params\": {},\n \"reference_asset_ids\": [\n \"<string>\"\n ],\n \"variant_count\": 2,\n \"action_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.semicola.com/api/v2/buyer/campaigns/{id}/creative-sessions")
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\": \"<string>\",\n \"title\": \"<string>\",\n \"objective\": \"<string>\",\n \"persona\": \"<string>\",\n \"params\": {},\n \"reference_asset_ids\": [\n \"<string>\"\n ],\n \"variant_count\": 2,\n \"action_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"session": {
"creative_session_id": "<string>",
"campaign_id": "<string>",
"title": "<string>",
"persona": "<string>",
"objective": "<string>",
"prompt": "<string>",
"accumulated_feedback": [
"<string>"
],
"status": "drafting",
"revision": 0,
"session_generation": 0,
"creative_plan": {
"modality": "image",
"format_kind": "image",
"params": {},
"provider_type": "<string>"
},
"flow": [
{
"label": "<string>",
"state": "done",
"summary": "<string>"
}
],
"variants": [
{
"build_variant_id": "<string>",
"name": "<string>",
"direction": "<string>",
"rationale": "<string>",
"quality": "draft",
"status": "draft",
"preview": {
"type": "image",
"url": "<string>"
},
"parent_build_variant_id": "<string>",
"recommended": true,
"score": 123,
"evaluation": [
{
"evaluator_id": "<string>",
"evaluator_version": "<string>",
"category": "readiness",
"code": "<string>",
"label": "<string>",
"stage": "draft",
"status": "pass",
"detail": "<string>",
"severity": "hard",
"blocking": true
}
]
}
],
"format_renders": [
{
"format_id": "<string>"
}
],
"notices": [
{
"code": "variant_count_mismatch",
"severity": "info",
"message": "<string>"
}
],
"engine": {
"engineId": "<string>",
"connectionId": "<string>"
},
"selected_variant_id": "<string>",
"refined_variant_id": "<string>",
"approval": {
"variant_id": "<string>",
"session_revision": 0,
"output_hash": "<string>"
},
"finalization": {
"creative_id": "<string>",
"manifest_id": "<string>",
"sync_status": "<string>",
"summary": "<string>"
},
"truncated": true,
"omitted": [
"<string>"
]
},
"revision": 0,
"sessionGeneration": 0,
"actionId": "<string>",
"status": "submitted",
"leaves": [
{
"leafId": "<string>",
"status": "submitted",
"taskId": "<string>",
"variantIds": [
"<string>"
],
"error": "<string>"
}
],
"funding": {
"fundedBy": "buyer",
"provider": "<string>",
"keySource": "engine_connection",
"connectionId": "<string>",
"credentialId": "<string>"
},
"sessionTruncated": true,
"sessionOmitted": [
"<string>"
]
},
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": "<unknown>"
}
}Authorizations
bearerAuthsessionCookie
API key or OAuth access token.
Path Parameters
Minimum string length:
1Body
application/json
Required string length:
1 - 5000Available options:
image, audio_hosted, video_hosted Maximum string length:
200Maximum string length:
500Maximum string length:
500Show child attributes
Show child attributes
Available options:
openai, gemini, fal Show child attributes
Show child attributes
Maximum array length:
10Minimum string length:
1Required range:
1 <= x <= 4Required string length:
8 - 128