AI Content Generation API for Marketing, Product, and Blog Copy
Molixa's AI Content Writer API turns one HTTPS request into clean marketing, product, blog, ad, and email copy. Pick a fast or quality provider tier, pay only for the words you receive, and drop the text straight into your product.
No subscription. Prepaid credits. One balance for every API.
curl -X POST \
https://molixa.app/api/v1/content/generate \
-H "X-Api-Key: mlx_live_…" \
-d '{
"task": "product-description",
"prompt": "Steel bottle, 24h cold",
"maxWords": 80 }'
# → { "ok": true, "text": "Stay hydrated…" }What the AI Content Writer API does
The Molixa AI Content Writer API is a single server-to-server endpoint that generates written copy on demand. You POST a JSON body describing what you want, and you get back finished text with no preamble, no "Here is your copy," and no chat framing. The response is a string you can save to a database, render in a UI, or pipe into another job.
One endpoint handles the whole range: POST /api/v1/content/generate. You choose the kind of copy with a task field, set a tone and language, cap the length, and pick a provider tier. There is no separate endpoint per content type and no model juggling on your side. The API resolves the provider, runs the generation, meters the output, and returns clean text.
It is built for teams that need programmatic writing at volume: e-commerce catalogs, marketing tools, CMS plugins, email platforms, and internal content pipelines. If a human would otherwise copy-paste into a chatbot and clean up the result, this API removes both the copy-paste and the cleanup.
- Single endpoint: POST /api/v1/content/generate
- Returns clean text ready to drop into a product, no preamble
- Generates marketing, blog, product, ad, and email copy
- Server-to-server and framework-agnostic; call it from any language
- Prepaid by the word, with a shared credit balance across Molixa APIs
# one endpoint · finished text out
POST /api/v1/content/generate
# body
{
"task": "blog-intro",
"prompt": "How to sleep better",
"maxWords": 150
}
# → clean string, no preamble, no chatThe task types, with examples
The task field tells the API what shape of copy to produce, so you do not have to engineer a prompt for structure. You still supply the subject matter in prompt; task handles the format. There are nine tasks, and the default is freeform.
Here are the tasks and what each is for. freeform writes to your prompt with no imposed structure. blog-intro writes an opening that sets up an article. blog-outline returns a structured outline of headings and points. blog-section drafts one section of a longer piece. product-description writes a listing description from product facts. ad-copy produces short, punchy ad text. email drafts an email body for outreach or campaigns. rewrite takes existing text and rewrites it in the tone and language you set. summarize condenses a longer input into a shorter version.
A concrete example: to write a product listing, send task: "product-description", prompt: "Noise-cancelling wireless earbuds, 40h battery, IPX5", tone: "confident", maxWords: 120. To turn a support article into a marketing email, send task: "rewrite" (or "email") with the source text in prompt and tone: "friendly". Because rewrite and summarize operate on text you pass in, they are the tasks you reach for when you already have content and want a variation or a shorter version.
Two provider tiers, and when to use each
Every request runs on one of two tiers, chosen with the tier field. The fast tier is powered by DeepSeek and is the default. It is very cheap and quick, and it is the right choice for the bulk of production traffic: product descriptions at scale, first-draft blog sections, ad variations, and routine rewrites where volume matters more than a marginal quality bump.
The quality tier is powered by OpenAI GPT-4o. It costs more per word and is worth reaching for when the copy is customer-facing hero text, a flagship blog piece, or anything where a small difference in phrasing has real business value. You set the tier per request, so a single integration can route high-volume jobs to fast and premium jobs to quality without any code branching beyond one field.
A practical pattern: default everything to fast, then flip specific tasks or specific customers to quality based on your own rules. Because billing is per word and refunds are automatic on failure, experimenting with tier on a slice of traffic carries no hidden cost.
- fast (DeepSeek): the default, very cheap, best for high-volume copy
- quality (OpenAI GPT-4o): higher cost, for customer-facing or flagship copy
- Tier is a per-request field, so one integration can mix both
- fast costs 0.20 credits/word ($0.20 per 1,000 words)
- quality costs 0.50 credits/word ($0.50 per 1,000 words)
Integration flow and a short example
Integration is one authenticated POST. You send your request to POST https://molixa.app/api/v1/content/generate with your key in the X-Api-Key header and a JSON body. The body takes task, prompt, tone, language, maxWords, and tier. A successful call returns ok: true along with the generated text, the words billed, the tier and model used, and your remaining credit balance.
- 1
Enable the Content API
Enabling the product on your partner account mints a key scoped to content generation only.
/dashboard/platform - 2
Send the secret key
Server-side calls use a secret mlx_ key that must stay on your backend and never ship to a browser.
X-Api-Key - 3
POST the JSON body
The body takes task, prompt, tone, language, maxWords, and tier. One authenticated POST does it.
task · prompt · tier - 4
Read the response
A success returns ok: true with the generated text, words billed, model used, and remaining balance.
data.text
# authorize-then-capture
maxWords 200 # worst-case authorized
wordsUsed 118 # actually generated
captured 118 words
refunded 82 words
# fast tier · 118 × 0.20 = 24 credits
# failure or BLOCKED → fully refunded
# out of credits → INSUFFICIENT_CREDITS (402)How billing works: pay for the words you get
Billing is authorize-then-capture, and it is honest about length. When you send a request, the API authorizes the worst case up front based on your maxWords cap. It generates, counts the words you actually received, captures that amount, and refunds the unused remainder. You are charged for the words you get and never more, even if you set a generous maxWords ceiling.
Pricing is simple and fixed per tier. Content costs 0.20 credits per word on the fast tier, which works out to $0.20 per 1,000 words, and 0.50 credits per word on the quality tier, or $0.50 per 1,000 words. One credit is worth $0.001. maxWords can go up to 2000 per request.
Failures cost nothing. If a generation fails on the provider side, or the input or output is blocked by the content policy, the charge is fully refunded. There is no partial capture on a failed job. When your balance runs out, the API returns an INSUFFICIENT_CREDITS error with a 402 status until you top up, rather than silently failing.
- Authorize the maxWords worst case, capture actual words, refund the rest
- fast: 0.20 credits/word ($0.20 / 1k words). quality: 0.50 credits/word ($0.50 / 1k words)
- 1 credit = $0.001; maxWords caps at 2000 per request
- Failed or policy-blocked generations are fully refunded
- Out of credits returns INSUFFICIENT_CREDITS (HTTP 402), not a silent failure
Safety: moderation, an Acceptable Use Policy, and human review
Both the input and the output run through moderation. Your prompt is checked before generation and the generated text is checked before it is returned. Flagged content is blocked and, because nothing usable was delivered, not charged. A blocked request comes back as a BLOCKED error with a 422 status so your code can handle it explicitly.
An Acceptable Use Policy applies to every generation. Your own terms should bind your users to it: no spam, no deceptive or illegal content, no disinformation, no harassment, and no unauthorized impersonation. Because you are calling the API on behalf of your users, you accept the policy per generation as part of the request, and you are responsible for the content your integration produces.
Moderation is a safety net, not a publishing decision. The API returns a draft. You remain responsible for reviewing generated copy before it goes live in front of your customers. Treat the output as a strong first draft that a human or your own downstream checks sign off on, not as content that is automatically ready to publish unread.
Realistic use cases
E-commerce product descriptions at scale is the clearest fit. Feed the API structured product facts with task: "product-description" and generate a consistent listing for every SKU in a catalog. Set a tone that matches your brand and a maxWords cap that matches your listing template, and run the whole catalog through the fast tier for a fraction of the cost of writing each one by hand.
Ad and marketing copy is a natural second use. ad-copy produces short promotional variations you can A/B test, and freeform handles landing-page blurbs, feature callouts, and social captions. Because tier and tone are per request, you can generate ten cheap fast-tier variants and then regenerate the winner on the quality tier for the final polish.
Blog drafts, email campaigns, and multilingual content round it out. Use blog-outline then blog-section to assemble long-form drafts a writer edits, email to draft campaign bodies your marketing platform sends, and the language field to produce the same copy across the markets you serve. rewrite and summarize let you repurpose one source article into intros, summaries, and localized variants without starting from scratch.
E-commerce
Generate a consistent listing for every SKU in a catalog from structured product facts on the fast tier.
Marketing
Spin up ad variants to A/B test, plus freeform landing blurbs, feature callouts, and social captions.
Blogging
Assemble editable long-form drafts with blog-outline then blog-section for a writer to polish.
Multilingual
Draft email campaigns and produce the same copy across every market with the language field.
Idempotency and reliability
Retries are safe when you send an Idempotency-Key header. If a request times out on your side or your job runner retries after a network blip, sending the same idempotency key replays the first result instead of generating and charging a second time. You get the original text back, and your credit balance is only debited once.
This matters because generation is a billed operation. Without idempotency, a naive retry loop could double-charge and produce two different drafts. With it, the first successful generation is the source of truth for that key, so at-least-once delivery in your infrastructure does not turn into duplicate content or duplicate spend.
Errors are predictable. Every error is a JSON response with a 4xx status and a stable code your code can branch on. RATE_LIMITED (429) means you have exceeded your per-partner rate limit and should back off. INSUFFICIENT_CREDITS (402) means top up. BLOCKED (422) means the content policy refused the request. GENERATION_FAILED (422) means the provider failed and your credit was refunded. Auth and input problems have their own codes so you can tell a bad key from a bad field.
- Send an Idempotency-Key header to make retries safe
- A repeat with the same key replays the first result and does not recharge
- All errors are JSON 4xx with a stable code
- Key codes: RATE_LIMITED (429), INSUFFICIENT_CREDITS (402), BLOCKED (422), GENERATION_FAILED (422)
- Per-partner rate limits and atomic, never-negative billing back the API
Every error is a JSON 4xx with a stable code your code can branch on. A repeat with the same idempotency key replays the first result, and billing is atomic and never negative.
A managed layer over the models, compared
| Molixa API | OpenAI direct | Writer apps | |
|---|---|---|---|
| Two model tiers, one endpoint | — | varies | |
| Built-in content moderation | — | some | |
| Task templates (blog, product…) | — | ||
| Idempotency keys | — | — | |
| One bill with the image API | — | — | |
| Pay only for words you receive | per token | varies | |
| Setup | One API call | SDK + prompt eng. | One API call |
Pricing
The API is prepaid. You buy a credit pack once, and there is no subscription and no per-seat fee. One credit is worth $0.001. Content generation costs 0.20 credits per word on the fast tier ($0.20 per 1,000 words) and 0.50 credits per word on the quality tier ($0.50 per 1,000 words). At the fast rate, a modest pack translates into a large amount of copy.
There are three packs, and bigger packs cost less per credit. Starter is $50 for 50,000 credits. Growth is $90 for 99,000 credits, a 10% bonus. Scale is $230 for 276,000 credits, a 20% bonus. To put that in words on the fast tier, 50,000 credits is 250,000 words, 99,000 credits is 495,000 words, and 276,000 credits is 1,380,000 words. Enterprise pricing is custom for serious volume.
The same credit balance powers both Molixa APIs. Buy credits once and spend them across content generation and watermark removal. Enabling a product mints a key scoped to that product, but the underlying balance is shared, so you top up in one place and draw from it wherever you need it.
| Unit | Credits | USD |
|---|---|---|
| 1 credit | 1 | $0.001 |
| Content · fast | 0.2 / word | $0.20 / 1k words |
| Content · quality | 0.5 / word | $0.50 / 1k words |
| Max length | ≤ 2,000 words | per request |
| Starter · 50,000 credits | 250,000 fast-tier words · or 100,000 quality-tier words | |
- Prepaid, no subscription, no per-seat fees; 1 credit = $0.001
- Starter: $50 for 50,000 credits (250,000 fast-tier words)
- Growth: $90 for 99,000 credits, +10% bonus (495,000 fast-tier words)
- Scale: $230 for 276,000 credits, +20% bonus (1,380,000 fast-tier words)
- One shared balance across the Content and Watermark APIs; bigger packs cost less per credit
One balance, honest pricing
Prepaid credit packs power both APIs. One credit is $0.001, bigger packs cost less per credit, and you only pay for calls that succeed.
- ~625 watermark removals
- ~250,000 words of content
- $0.0010 per credit
- ~1,237 watermark removals
- ~495,000 words of content
- $0.0009 per credit
- ~3,450 watermark removals
- ~1,380,000 words of content
- $0.0008 per credit
Need enterprise volume? Talk to us.
Getting started
Access is by application. Apply at /partners, tied to a Molixa account so your keys, credits, and usage live in one place. Reviews are done by hand, usually within a business day or two, and you get a key plus starter credits so you can go live.
- 1
Apply for access
Apply at /partners, tied to a Molixa account. Reviews are by hand, usually within a business day or two.
/partners - 2
Enable + mint a key
Enable the Content API from your dashboard to mint a content-scoped key, then send your first POST.
/dashboard/platform - 3
Read the reference
Every task, the error table, and copy-paste curl and Node samples live in the full docs.
/content-api - 4
Reuse your balance
Already a watermark partner? Enable content on the same account and draw from the credits you hold.
shared balance
# write a thousand, not one
for (const sku of catalog) {
const { text } = await generate({
task: "product-description",
prompt: sku.facts, tier: "fast",
});
await db.save(sku.id, text);
}
# structure, tone, maxWords, tier — per call
# deterministic billing · idempotent retriesWhy an API instead of a chatbot in the loop
A chatbot is a person-in-the-loop tool. It is great for one-off drafting and terrible for volume, because every generation needs someone to prompt, copy, and clean up. The Content API removes the human from the repetitive path. Your product calls it, gets clean text back, and stores or renders it without a copy-paste step.
It also gives you control a chat window cannot. Task types enforce structure, the tone and language fields keep output on-brand and localized, maxWords caps length and cost, and tier lets you trade speed and price against quality per request. You get deterministic billing, idempotent retries, stable error codes, and a shared prepaid balance, which are the things a production pipeline needs and a chat UI does not provide.
In short, use a chatbot to write one thing and the API to write a thousand. When writing becomes a step in a program rather than a task for a person, the Content API is the integration point.
Frequently asked questions
It generates marketing, blog, product, ad, and email copy from a single endpoint, POST /api/v1/content/generate. You pick a task type, supply a prompt, and get back clean text with no preamble, ready to save or render in your product.
Nine tasks: freeform (the default), blog-intro, blog-outline, blog-section, product-description, ad-copy, email, rewrite, and summarize. The task field controls the format while your prompt supplies the subject. rewrite and summarize transform text you pass in.
The fast tier runs on DeepSeek. It is the default, very cheap, and best for high-volume copy. The quality tier runs on OpenAI GPT-4o, costs more, and is for customer-facing or flagship copy. You set the tier per request, so one integration can use both.
Content costs 0.20 credits per word on the fast tier ($0.20 per 1,000 words) and 0.50 credits per word on the quality tier ($0.50 per 1,000 words). One credit is worth $0.001. It is prepaid with credit packs: Starter $50 for 50,000 credits, Growth $90 for 99,000, and Scale $230 for 276,000.
Billing is authorize-then-capture. The API authorizes your maxWords worst case, generates, then captures only the words you actually receive and refunds the rest. A failed or policy-blocked generation is fully refunded, so you never pay for output you did not get.
Yes. Send an Idempotency-Key header and a repeat request with the same key replays the first result instead of generating and charging again. That prevents double-charging and duplicate drafts when your job runner retries after a timeout or network blip.
Send your key in the X-Api-Key header. Enabling the Content API mints a scoped key that only works for content generation. Use a secret mlx_ key for server-side calls (keep it on your backend). A domain-locked publishable pub_ key exists for browser use, but generation is a server-side pattern.
Both the input and the output are run through moderation, and flagged content is blocked and not charged. An Acceptable Use Policy applies to every generation, which your terms should bind your users to. Moderation is a safety net; you remain responsible for reviewing copy before you publish it.
Yes. One prepaid credit balance powers both the Content and Watermark APIs. You buy credits once and spend them across both. Enabling a product mints a key scoped to that product, but the underlying balance is shared, so you top up in one place.
Apply for access at /partners. After approval, enable the Content API from your dashboard at /dashboard/platform to mint a content-scoped key, then read the full reference and code samples at /content-api and send your first request.
Generate on-brand copy from one endpoint
Sign up, enable the AI Content Writer API, and turn prompts into finished copy your product can ship.