Scale / Test / Kill decisions
Scale / Test / Kill for every Meta ad with spend in the window, with CPMr x CPA quadrants and optional pooled attribute groups. Zones come from a Gamma-Poisson model (Jeffreys prior) of conversions per unit of spend: scale when P(CPA < target) >= confidence, kill when P(CPA > target) >= confidence, else test. They describe observed cost per conversion, not causality. Ads whose conversions are unknown are unclassifiable with a reason; ads in another currency or objective are listed in population.omitted. CPMr uses Meta's daily reach summed over the window (reach_summed_daily), which overcounts repeat reach.
curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/creatives/decisions?location_id=example_string&conversion=meta%3Alead&from=2024-12-25&to=2024-12-25&window=7d_click&model=last&pipeline=example_string&account_id=example_string&objective=OUTCOME_LEADS&target_cpa=3.14&confidence=0.9&group_by=hook_type&new_customers=true" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/creatives/decisions?location_id=example_string&conversion=meta%3Alead&from=2024-12-25&to=2024-12-25&window=7d_click&model=last&pipeline=example_string&account_id=example_string&objective=OUTCOME_LEADS&target_cpa=3.14&confidence=0.9&group_by=hook_type&new_customers=true"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/creatives/decisions?location_id=example_string&conversion=meta%3Alead&from=2024-12-25&to=2024-12-25&window=7d_click&model=last&pipeline=example_string&account_id=example_string&objective=OUTCOME_LEADS&target_cpa=3.14&confidence=0.9&group_by=hook_type&new_customers=true", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://mythic-analytics.gulp.workers.dev/client/v1/creatives/decisions?location_id=example_string&conversion=meta%3Alead&from=2024-12-25&to=2024-12-25&window=7d_click&model=last&pipeline=example_string&account_id=example_string&objective=OUTCOME_LEADS&target_cpa=3.14&confidence=0.9&group_by=hook_type&new_customers=true", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/creatives/decisions?location_id=example_string&conversion=meta%3Alead&from=2024-12-25&to=2024-12-25&window=7d_click&model=last&pipeline=example_string&account_id=example_string&objective=OUTCOME_LEADS&target_cpa=3.14&confidence=0.9&group_by=hook_type&new_customers=true')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"window": {
"from": "example_string",
"to": "example_string",
"days": 42
},
"conversion": {},
"confidence": 3.14,
"currency": "example_string",
"objective": "example_string",
"targets": {
"client": 3.14,
"campaigns": {},
"currency": "example_string",
"override": 3.14,
"applied": true,
"override_applied": true
},
"population": {
"ads_with_spend": 42,
"spend": 3.14,
"decided_ads": 123,
"zones": {
"scale": 42,
"test": 42,
"kill": 42,
"unclassifiable": 42
},
"unclassifiable_by_reason": {},
"omitted_by_reason": {},
"omitted": [
{
"ad_id": "example_string",
"reason": "other_currency",
"spend": 3.14
}
],
"currencies": [
{}
],
"objectives": [
{}
],
"ads_without_actions_copy": 42,
"actions_coverage": {}
},
"medians": {
"by_account": {}
},
"points": [
{
"zone": "scale",
"reason": "no_spend",
"band": "converting",
"cpa": 3.14,
"p_cpa_below_target": 3.14,
"p_cpa_above_target": 3.14,
"cpa_interval": [
3.14
],
"target_cpa": 3.14,
"target_source": "request",
"ad_id": "example_string",
"ad_name": "John Doe",
"account_id": "example_string",
"campaign_id": "example_string",
"campaign_name": "John Doe",
"adset_id": "example_string",
"adset_name": "John Doe",
"currency": "example_string",
"objective": "example_string",
"attribution_settings": [
"example_string"
],
"first_date": "2024-12-25",
"last_date": "2024-12-25",
"days_with_spend": 42,
"spend": 3.14,
"spend_copy": 3.14,
"impressions": 42,
"reach_summed_daily": 42,
"reach_missing_days": 42,
"cpmr": 3.14,
"conversions": 3.14,
"outcome_missing": "not_in_actions_copy",
"actions_coverage": "aligned",
"quadrant": {
"cpmr": "low",
"cpa": "low"
},
"format": "example_string",
"tags": {},
"analysis_status": "example_string"
}
],
"groups": {
"by": "example_string",
"overlapping": true,
"note": "example_string",
"items": [
{
"zone": "scale",
"reason": "no_spend",
"band": "converting",
"cpa": 3.14,
"p_cpa_below_target": 3.14,
"p_cpa_above_target": 3.14,
"cpa_interval": [
3.14
],
"target_cpa": 3.14,
"target_source": "request",
"value": "example_string",
"label": "example_string",
"ad_ids": [
"example_string"
],
"ads": 42,
"spend": 3.14,
"conversions": 3.14,
"excluded_missing_outcomes": 42,
"untargeted_ads": 42
}
],
"without_value": {
"ads": 42,
"spend": 3.14,
"not_analyzed": 42
}
},
"group_values": {},
"curves": [
{
"target_cpa": 3.14,
"zero_conversion_kill_spend": 3.14,
"points": [
{
"spend": 3.14,
"scale_max_cpa": 3.14,
"kill_min_cpa": 3.14,
"scale_min_conversions": 3.14,
"kill_max_conversions": 3.14,
"killable": true,
"kill_only_without_conversions": true
}
]
}
],
"available_action_types": [
{
"action_type": "example_string",
"count": 3.14
}
],
"notes": {}
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Error",
"message": "Error. The code names the cause, e.g. `feature_not_in_plan`, `agency_required`, `not_found`, `sync_throttled`, `sync_in_progress`, `no_meta_source`, `pipeline_disabled`.",
"code": 402
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
{
"error": "Service Unavailable",
"message": "The service is temporarily unavailable. Please try again later",
"code": 503
}
/client/v1/creatives/decisions
Target server for requests. Edit to use your own host.
Agency key (ak_), location secret key (sk_, reads only) or a scoped mcp_ key with creative_analysis:read or creative_analysis:write. See Using an mcp_ key over HTTP.
ak_), location secret key (sk_, reads only) or a scoped mcp_ key with creative_analysis:read or creative_analysis:write. See Using an mcp_ key over HTTP.Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.
meta:<action_type> (Meta's count), mythic:event:<event> or mythic:deals (Mythic attribution; needs the Data API, refused for HIPAA locations).
Default: 29 days before to. At most 366 days.
Default: today (UTC).
Meta conversions only. Attribution window, default 7d_click. value is each ad set's own setting and answers 422 when the ads use several.
Mythic conversions only. Default last; linear gives fractional counts.
mythic:deals only: one pipeline by exact name.
Meta objective to compare within. Default: the top-spend objective.
What-if target for every ad, in the account currency. Never saved.
Not supported: true answers 422 new_customers_unsupported.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_), location secret key (sk_, reads only) or a scoped mcp_ key with creative_analysis:read or creative_analysis:write. See Using an mcp_ key over HTTP.
Query Parameters
Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.
meta:<action_type> (Meta's count), mythic:event:<event> or mythic:deals (Mythic attribution; needs the Data API, refused for HIPAA locations).
meta:leadDefault: 29 days before to. At most 366 days.
Default: today (UTC).
Meta conversions only. Attribution window, default 7d_click. value is each ad set's own setting and answers 422 when the ads use several.
7d_click1d_click28d_click1d_view1d_evvalueMythic conversions only. Default last; linear gives fractional counts.
lastfirstlinearmythic:deals only: one pipeline by exact name.
Meta objective to compare within. Default: the top-spend objective.
OUTCOME_LEADSWhat-if target for every ad, in the account currency. Never saved.
hook_typeangleofferformatcampaignNot supported: true answers 422 new_customers_unsupported.