curl --request POST \
--url https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"request": {}
}'import requests
url = "https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-sessions"
payload = { "request": {} }
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({request: {}})
};
fetch('https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"creative_session_id": "<string>",
"campaign_id": "<string>",
"title": "<string>",
"persona": "<string>",
"brand": "<string>",
"objective": "<string>",
"prompt": "<string>",
"status": "drafting",
"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>",
"alt": "<string>",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
}
},
"parent_build_variant_id": "<string>",
"recommended": true,
"score": 123,
"evaluation": [
{
"label": "<string>",
"status": "pass",
"detail": "<string>",
"evaluator_id": "<string>",
"evaluator_version": "<string>",
"category": "readiness",
"code": "<string>",
"stage": "generation",
"severity": "hard",
"blocking": true,
"confidence": 0.5,
"evidence_refs": [
"<string>"
],
"remediation": "<string>"
}
]
}
],
"format_renders": [
{
"format_id": "<string>",
"label": "<string>",
"publisher_context": "<string>",
"preview": {
"type": "image",
"url": "<string>",
"alt": "<string>",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
}
},
"dimensions": "<string>",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
},
"evaluation": [
{
"label": "<string>",
"status": "pass",
"detail": "<string>",
"evaluator_id": "<string>",
"evaluator_version": "<string>",
"category": "readiness",
"code": "<string>",
"stage": "generation",
"severity": "hard",
"blocking": true,
"confidence": 0.5,
"evidence_refs": [
"<string>"
],
"remediation": "<string>"
}
]
}
],
"engine": {
"engineId": "<string>",
"connectionId": "<string>"
},
"presentation": "generative-widgets",
"brand_reference": {
"domain": "<string>",
"brand_id": "<string>",
"industries": [
"<string>"
],
"data_subject_contestation": {
"url": "<string>",
"email": "jsmith@example.com",
"languages": [
"<string>"
]
},
"brand_kit_override": {
"logo": {
"asset_type": "image",
"url": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"format": "<string>",
"alt_text": "<string>"
},
"colors": {
"primary": "<string>",
"secondary": "<string>",
"accent": "<string>"
},
"voice": "<string>",
"tagline": "<string>"
}
},
"accumulated_feedback": [
"<string>"
],
"source_asset": {
"label": "<string>",
"url": "<string>",
"asset_id": "<string>",
"source": "upload",
"role": "product",
"locked_asset": true,
"can_transform": true,
"preservation_notes": "<string>",
"rights": {
"status": "unknown",
"usage": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>"
},
"dimensions": {
"width": 4503599627370495,
"height": 4503599627370495,
"duration_seconds": 1
},
"render_crop": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5,
"units": "normalized",
"source": "user",
"notes": "<string>"
},
"checksum": "<string>",
"mime_type": "<string>"
},
"asset_store": {
"status": "linked",
"summary": "<string>",
"assets": [
{
"label": "<string>",
"url": "<string>",
"asset_id": "<string>",
"source": "upload",
"role": "product",
"locked_asset": true,
"can_transform": true,
"preservation_notes": "<string>",
"rights": {
"status": "unknown",
"usage": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>"
},
"dimensions": {
"width": 4503599627370495,
"height": 4503599627370495,
"duration_seconds": 1
},
"render_crop": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5,
"units": "normalized",
"source": "user",
"notes": "<string>"
},
"checksum": "<string>",
"mime_type": "<string>"
}
],
"renditions": [
{
"asset_id": "<string>",
"parent_asset_id": "<string>",
"rendition_type": "transparent_cutout",
"label": "<string>",
"url": "<string>",
"source": "upload",
"role": "product",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"alpha": true,
"locked_asset": true,
"can_transform": true,
"rights": {
"status": "inherited",
"usage": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"source_asset_id": "<string>"
},
"provenance": {
"method": "background_removal",
"provider": "<string>",
"source_checksum": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"quality": {
"status": "approved",
"checks": [
{
"code": "<string>",
"status": "pass",
"detail": "<string>"
}
]
}
}
]
},
"creative_plan": {
"provider_type": "amazon",
"modality": "image",
"format_discovery": "canonical",
"format_source": "explicit",
"manifest_strategy": "pass_through",
"generation_strategy": "native_reference_edit",
"composition_strategy": "native_integrated_with_locked_final_overlay",
"variant_strategy": {
"values": [
"<string>"
],
"requested_count": 4503599627370495,
"feedback_mode": "select_then_refine",
"evaluator_mode": "draft_soft_final_hard",
"dimension": "<string>"
},
"native_capabilities": {
"reference_image_input": true,
"native_image_editing": true,
"locked_asset_compositing": true,
"audio_duration_targeting": true,
"audio_language_control": true
},
"required_assets": [
{
"asset_id": "<string>",
"asset_type": "<string>",
"required": true,
"source": "format_catalog"
}
],
"target_format_id": {
"agent_url": "<string>",
"id": "<string>",
"width": 4503599627370495,
"height": 4503599627370495
},
"format_kind": "image",
"params": {
"width": 4503599627370495,
"height": 4503599627370495,
"duration_ms_exact": 4503599627370495
},
"transformer_id": "<string>"
},
"required_placements": [
{
"format_id": "<string>",
"agent_url": "<string>",
"label": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"dimensions": "<string>"
}
],
"renderer_capabilities": [
{
"format_id": "<string>",
"label": "<string>",
"modality": "image",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
},
"dimensions": "<string>",
"publisher_context": "<string>"
}
],
"rendering_model": {
"creative_canvas": {
"label": "<string>",
"description": "<string>",
"includes": [
"<string>"
],
"excludes": [
"<string>"
]
},
"review_surface": {
"label": "<string>",
"description": "<string>",
"includes": [
"<string>"
],
"excludes": [
"<string>"
]
}
},
"selected_variant_id": "<string>",
"refined_variant_id": "<string>",
"approval": {
"variant_id": "<string>",
"session_revision": 4503599627370495,
"output_hash": "<string>",
"approved_rendition_id": "<string>",
"primary_bytes_sha256": "<string>",
"approved_by_principal_sha256": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"rights_provenance": {
"kind": "engine_grant",
"engine_id": "<string>",
"connection_id": "<string>",
"credential_id": "<string>"
}
},
"next_steps": [
{
"kind": "creative_review",
"label": "<string>",
"status": "done",
"summary": "<string>",
"action": "<string>"
}
],
"notices": [
{
"code": "variant_count_mismatch",
"severity": "info",
"message": "<string>"
}
],
"finalization": {
"creative_id": "<string>",
"manifest_id": "<string>",
"sync_status": "<string>",
"summary": "<string>"
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Start creative session
Start a reviewable creative session and generate draft variants for a campaign.
curl --request POST \
--url https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"request": {}
}'import requests
url = "https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-sessions"
payload = { "request": {} }
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({request: {}})
};
fetch('https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"creative_session_id": "<string>",
"campaign_id": "<string>",
"title": "<string>",
"persona": "<string>",
"brand": "<string>",
"objective": "<string>",
"prompt": "<string>",
"status": "drafting",
"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>",
"alt": "<string>",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
}
},
"parent_build_variant_id": "<string>",
"recommended": true,
"score": 123,
"evaluation": [
{
"label": "<string>",
"status": "pass",
"detail": "<string>",
"evaluator_id": "<string>",
"evaluator_version": "<string>",
"category": "readiness",
"code": "<string>",
"stage": "generation",
"severity": "hard",
"blocking": true,
"confidence": 0.5,
"evidence_refs": [
"<string>"
],
"remediation": "<string>"
}
]
}
],
"format_renders": [
{
"format_id": "<string>",
"label": "<string>",
"publisher_context": "<string>",
"preview": {
"type": "image",
"url": "<string>",
"alt": "<string>",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
}
},
"dimensions": "<string>",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
},
"evaluation": [
{
"label": "<string>",
"status": "pass",
"detail": "<string>",
"evaluator_id": "<string>",
"evaluator_version": "<string>",
"category": "readiness",
"code": "<string>",
"stage": "generation",
"severity": "hard",
"blocking": true,
"confidence": 0.5,
"evidence_refs": [
"<string>"
],
"remediation": "<string>"
}
]
}
],
"engine": {
"engineId": "<string>",
"connectionId": "<string>"
},
"presentation": "generative-widgets",
"brand_reference": {
"domain": "<string>",
"brand_id": "<string>",
"industries": [
"<string>"
],
"data_subject_contestation": {
"url": "<string>",
"email": "jsmith@example.com",
"languages": [
"<string>"
]
},
"brand_kit_override": {
"logo": {
"asset_type": "image",
"url": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"format": "<string>",
"alt_text": "<string>"
},
"colors": {
"primary": "<string>",
"secondary": "<string>",
"accent": "<string>"
},
"voice": "<string>",
"tagline": "<string>"
}
},
"accumulated_feedback": [
"<string>"
],
"source_asset": {
"label": "<string>",
"url": "<string>",
"asset_id": "<string>",
"source": "upload",
"role": "product",
"locked_asset": true,
"can_transform": true,
"preservation_notes": "<string>",
"rights": {
"status": "unknown",
"usage": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>"
},
"dimensions": {
"width": 4503599627370495,
"height": 4503599627370495,
"duration_seconds": 1
},
"render_crop": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5,
"units": "normalized",
"source": "user",
"notes": "<string>"
},
"checksum": "<string>",
"mime_type": "<string>"
},
"asset_store": {
"status": "linked",
"summary": "<string>",
"assets": [
{
"label": "<string>",
"url": "<string>",
"asset_id": "<string>",
"source": "upload",
"role": "product",
"locked_asset": true,
"can_transform": true,
"preservation_notes": "<string>",
"rights": {
"status": "unknown",
"usage": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>"
},
"dimensions": {
"width": 4503599627370495,
"height": 4503599627370495,
"duration_seconds": 1
},
"render_crop": {
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5,
"units": "normalized",
"source": "user",
"notes": "<string>"
},
"checksum": "<string>",
"mime_type": "<string>"
}
],
"renditions": [
{
"asset_id": "<string>",
"parent_asset_id": "<string>",
"rendition_type": "transparent_cutout",
"label": "<string>",
"url": "<string>",
"source": "upload",
"role": "product",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"alpha": true,
"locked_asset": true,
"can_transform": true,
"rights": {
"status": "inherited",
"usage": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"source_asset_id": "<string>"
},
"provenance": {
"method": "background_removal",
"provider": "<string>",
"source_checksum": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"quality": {
"status": "approved",
"checks": [
{
"code": "<string>",
"status": "pass",
"detail": "<string>"
}
]
}
}
]
},
"creative_plan": {
"provider_type": "amazon",
"modality": "image",
"format_discovery": "canonical",
"format_source": "explicit",
"manifest_strategy": "pass_through",
"generation_strategy": "native_reference_edit",
"composition_strategy": "native_integrated_with_locked_final_overlay",
"variant_strategy": {
"values": [
"<string>"
],
"requested_count": 4503599627370495,
"feedback_mode": "select_then_refine",
"evaluator_mode": "draft_soft_final_hard",
"dimension": "<string>"
},
"native_capabilities": {
"reference_image_input": true,
"native_image_editing": true,
"locked_asset_compositing": true,
"audio_duration_targeting": true,
"audio_language_control": true
},
"required_assets": [
{
"asset_id": "<string>",
"asset_type": "<string>",
"required": true,
"source": "format_catalog"
}
],
"target_format_id": {
"agent_url": "<string>",
"id": "<string>",
"width": 4503599627370495,
"height": 4503599627370495
},
"format_kind": "image",
"params": {
"width": 4503599627370495,
"height": 4503599627370495,
"duration_ms_exact": 4503599627370495
},
"transformer_id": "<string>"
},
"required_placements": [
{
"format_id": "<string>",
"agent_url": "<string>",
"label": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"dimensions": "<string>"
}
],
"renderer_capabilities": [
{
"format_id": "<string>",
"label": "<string>",
"modality": "image",
"renderer": {
"kind": "image",
"label": "<string>",
"mime_type": "<string>",
"width": 4503599627370495,
"height": 4503599627370495,
"controls": true,
"canonical": true
},
"dimensions": "<string>",
"publisher_context": "<string>"
}
],
"rendering_model": {
"creative_canvas": {
"label": "<string>",
"description": "<string>",
"includes": [
"<string>"
],
"excludes": [
"<string>"
]
},
"review_surface": {
"label": "<string>",
"description": "<string>",
"includes": [
"<string>"
],
"excludes": [
"<string>"
]
}
},
"selected_variant_id": "<string>",
"refined_variant_id": "<string>",
"approval": {
"variant_id": "<string>",
"session_revision": 4503599627370495,
"output_hash": "<string>",
"approved_rendition_id": "<string>",
"primary_bytes_sha256": "<string>",
"approved_by_principal_sha256": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"rights_provenance": {
"kind": "engine_grant",
"engine_id": "<string>",
"connection_id": "<string>",
"credential_id": "<string>"
}
},
"next_steps": [
{
"kind": "creative_review",
"label": "<string>",
"status": "done",
"summary": "<string>",
"action": "<string>"
}
],
"notices": [
{
"code": "variant_count_mismatch",
"severity": "info",
"message": "<string>"
}
],
"finalization": {
"creative_id": "<string>",
"manifest_id": "<string>",
"sync_status": "<string>",
"summary": "<string>"
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
1Body
Creative provider type.
amazon, audiostack, elevenlabs, fal, gemini, google, linkedin, meta, openai, openai_ads, pinterest, reddit, snap, spotify, tiktok, veo Provider-neutral creative request.
Show child attributes
Show child attributes
Connected seller storefront, when the engine requires one.
0 < x <= 9007199254740991Requested BCP-47 language for generated audio. Supported language families are English (en), Dutch (nl), Spanish (es), and Portuguese (pt), such as pt-BR.
2 - 35Connected external account identifier.
1Creative brief title.
1 - 255Intended audience persona.
1 - 255Brand for the creative.
1 - 255Creative objective.
1 - 2000Creative prompt.
1 - 5000Primary locked reference asset.
Show child attributes
Show child attributes
Reference assets for the session.
Show child attributes
Show child attributes
Derived reference-asset renditions.
Show child attributes
Show child attributes
Whether partial generation success is acceptable.
Response
Start creative session
drafting, refining, evaluating, finalized Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
generative-widgets Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes