Market4Me for developers
Point Market4Me at a website and it builds a structured understanding of that business — tone, audience, products, USP, content pillars. Every generation after that is on-brand automatically, so you stop re-describing the company in every prompt.
Quickstart
Everything below works with one key. Create one in the dashboard under Settings → API & integrations.
Check the key works
/meis the first call you should ever make. It confirms the key, and returns your plan, credit balance, the brands on the account, and which endpoints are gated — everything needed to plan work without guessing.bashcurl https://gateway.market4me.ai//api/v1/me \ -H "Authorization: Bearer m4m_live_YOUR_KEY"Price it before you spend
Free, instant, and it tells you whether the balance covers it.
bashcurl https://gateway.market4me.ai//api/v1/estimate \ -H "Authorization: Bearer m4m_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"operation":"video","duration_s":5,"quality":"1080p"}'Generate something
Returns the finished video URL in one synchronous call. The
Idempotency-Keymeans a network retry can never charge you twice.bashcurl https://gateway.market4me.ai//api/v1/videos \ -H "Authorization: Bearer m4m_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"prompt":"Cold brew poured over ice, morning light through a café window"}'
The brand brain
This is the part worth understanding, because it is what makes the output different from a generic video model.
When you create a brand with a website_url, Market4Me crawls the site and builds brand intelligence: tone of voice, who the audience actually is, the products, the USP, the brand story, key messages, content pillars. That takes 30–90 seconds and happens once.
From then on every generation is grounded in it automatically. You write "a video about our summer sale" and get something that sounds like the business, not like a stock ad. You can opt out per call with use_brand: false, and you can read the whole brain with GET /brands/{id}/intelligence if you want to reason about it yourself.
# 1. create + analyse
curl https://gateway.market4me.ai//api/v1/brands \
-H "Authorization: Bearer m4m_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Acme Coffee","website_url":"https://acmecoffee.com"}'
# 2. poll until analysis_status is "complete" (30–90s)
curl https://gateway.market4me.ai//api/v1/brands/BRAND_ID \
-H "Authorization: Bearer m4m_live_YOUR_KEY"
# 3. everything after this is on-brand with no extra prompting
curl https://gateway.market4me.ai//api/v1/content \
-H "Authorization: Bearer m4m_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"brand_id":"BRAND_ID","content_type":"short_video","topic":"summer sale"}'Omitting brand_id is fine. Calls fall back to the account's default workspace, which is what you want when an agent is calling on a user's behalf and has no id to hand.
Credits & pricing
Generation costs credits, deducted up front and refunded automatically if the generation fails. You are never charged for something you did not get.
Cost scales with what you ask for — duration, resolution, model tier, characters of speech. Rather than publish a table that goes stale, the API prices any operation for free:
POST /api/v1/estimate
{
"operations": [
{ "operation": "video", "duration_s": 5, "quality": "1080p" },
{ "operation": "image" },
{ "operation": "speech", "text": "Cold brew, made properly." }
]
}
→ {
"total_credits": 445,
"credits_available": 12000,
"sufficient": true,
"operations": [ … per-operation breakdown … ]
}Use the operations array to budget a whole campaign in one call before spending anything.
A timeout is not a failure. If a synchronous render outlives the request window you get 202 with status: "processing". The render is still going and the credits stay charged — because you will get the asset.
Do not resubmit; that pays for a second video. The result lands in GET /assets.
Conventions
- Base URL —
https://gateway.market4me.ai//api/v1 - Versioning — the version is in the path. Breaking changes ship as
/v2; new optional fields can appear inv1at any time, so parse leniently. - Format — JSON in, JSON out. Every response carries an
objectfield naming its type. - Errors — one shape everywhere, with a stable
error.codeto branch on. See Errors. - IDs — prefixed and opaque (
job_…,evt_…,req_…). Do not parse them.