ForHosting KIT · Text & AI

A/B copy variants

A/B testing only works when the variants are actually different from each other, not the same sentence rearranged three times. This endpoint takes one piece of copy — an ad, a button label, a subject line — and produces genuinely distinct alternatives built on different angles, so your test has something real to measure.

● StablePer request + per variant$0.003
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The problem with most 'variant' generators

Ask a generic model for three versions of the same sentence and you'll often get three versions that differ only in adjective choice — which tells you nothing when the test concludes. text.ab_variants is built specifically to diversify the underlying angle: one variant might lead with a benefit, another with urgency, another with social proof framing, another as a direct question. That structural difference is what makes a split test statistically meaningful instead of cosmetic.

How the request and result flow works

You send a POST to /text/ab-variants with your base copy and the number of variants you want, and get back a task_id right away while generation happens asynchronously. The finished set arrives at your webhook endpoint, or sits behind a signed link for 24 hours if you'd rather pull it yourself. Either way, nothing blocks your application thread waiting on a model response.

Why split testing rewards this kind of structure

Split testing as a formal practice predates digital marketing entirely — direct-mail copywriters were running controlled headline tests with postage-stamp economics decades before the web existed. What changed online is the speed of the feedback loop: a test that once took a mail cycle of weeks can now report significance in days, which means the bottleneck shifted from waiting for results to producing enough genuinely distinct variants to test in the first place.

Copy that stays honest across every variant

Every variant is grounded in the facts you provide about the product or offer — the endpoint won't manufacture a discount, a deadline or a feature that isn't in your source copy just to make one version punchier. That matters doubly in A/B testing: a variant that wins on an exaggerated claim will lose on conversion quality downstream, and you'll have optimized for the wrong metric.

Fitting it into your testing pipeline

Because results land via webhook, you can wire this directly into a testing platform's variant-upload step, a CI job that regenerates ad copy before a campaign refresh, or a landing-page builder that needs three headline-and-button pairs before it publishes. Combine it with the headline endpoint when the test spans both the page title and its call-to-action button.

Paid ad campaign launch

A performance marketer generates four distinct ad copy angles before a campaign goes live instead of manually rewriting the same line four times.

Checkout button testing

An e-commerce team tests different call-to-action phrasing on the checkout button without guessing which wording actually reduces cart abandonment.

Email subject line split test

A lifecycle marketing tool requests three subject line variants per campaign and auto-assigns them to test segments before the send.

Landing page headline test

A growth team runs a headline test alongside a CTA test in the same release cycle, generating both variant sets from the same product description.

How do I generate A/B test copy with an API?

POST your base copy and desired variant count to /text/ab-variants, get a task_id back immediately, and receive the finished variants by webhook or a signed 24-hour link once processing completes.

Is the A/B variant generator free?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How many variants can I request at once?

You specify the count in your request; there's no fixed cap built into the pricing model since each variant is billed individually at $0.0135.

Are the variants actually different, or just reworded?

The endpoint is built to vary the underlying angle — benefit-led, urgency-led, social-proof-led, question-led — not just swap synonyms, which is what makes them useful for a real statistical test.

Can I use this for email, ads and buttons in the same call?

Yes, submit whichever copy type you're testing; the endpoint works on any short-form marketing copy, from subject lines to button labels to ad headlines.

What happens if a variant generation task fails?

Failed tasks retry automatically up to three times, and if all attempts fail you receive a clear error with no charge for that task.

How is pricing calculated for bulk variant generation?

Each call costs a flat $0.003 request fee plus $0.0135 per variant returned, so testing ten campaigns with four variants each is a predictable, itemized cost.

Do I need to poll for results?

No — set a webhook URL and results are pushed to you automatically, or use the signed link if you prefer to fetch results on your own schedule within 24 hours.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/text/ab-variants

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/text/ab-variants \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"…"}'
{
  "input": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "text.ab_variants",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.003
Per variant$0.0135

Published price — no tokens, no invented credits. A failed task is never charged.

max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →