Skip to content

Creatives

Creatives is the direct-response copy engine. It uses the internal OpenRouter gateway to generate compliant affiliate creative on demand, per platform, audience, and tone.


Key fields

Field Meaning
id BV_ID (workspace-scoped).
publish_type CREATOR · LANDING · SHARE.
platform META · INSTAGRAM · LINKTREE · OTHER.
target_age Target age of the audience.
created_at Timestamp.
creative Generated direct-response text (headline + body + rationale).

How generation works

The generator endpoint (api/ai/creative/route.ts) enforces a full safety + output contract:

  • No misleading copy — no false claims, guaranteed results, fake scarcity, fake testimonials, medical or financial promises, celebrity names, or unauthorized trademarks.
  • Policy compliance — compliant with ClickBank, Meta, and Google advertising policies.
  • Structured output — returns ONLY JSON of the shape { headline, content, rationale }, validated with Zod against outputSchema before persistence.
  • Model selection — a specific bv_ai_models row may be chosen, or the first active copywriting model is picked automatically (default openai/gpt-4o-mini).

Prompt contract

  • The system prompt tells the model it is a senior direct-response copywriter for affiliate marketing and must return only structured JSON.
  • Context: product (category, price, payout, audience), target audience, country, tone, and language (en / pt / es).
  • Temperature 0.8, maxTokens 2000.