Generate content plan

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Generates the full content plan: a set of posts for each platform you approve, written from the app's accepted strategy.

Submit answers and accept a strategy first. This endpoint fails with a 409 unless the app has a strategy, and while another generation is already running for the app.

This request costs 10 credits and fails with a 402 when the workspace is out of quota. It runs the whole generation inline, one language model call per platform plus the first platform's images, so it can take several minutes with 3 platforms. Use a long client timeout. The remaining images generate in the background, so poll Get social content state to pick up the image_url values that land after the response.

Generating a plan replaces any plan the app already has, including its generated images.

This endpoint shares a limit of 15 requests per minute with the other social content endpoints.

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>

<Warning>The response may include fields beyond the ones documented here. Don't use any undocumented fields, as they can change at any time.</Warning>

post/api/apps/{app_id}/virality/generate

Path parameters

app_idstring required

ID of the app.

ID of the app.

Request body

platformsstring[] required

Platforms to generate content for, 1 to 3 of x, instagram, tiktok, linkedin, reddit, facebook. The order is preserved in the response. Unsupported values are ignored, and a request where none are supported fails with a 400.

social_urlstring nullable

HTTPS URL of your social profile, used to match the writing voice of the generated content. Omit it to reuse the voice resolved when you submitted answers.

Example request

{
  "platforms": [
    "instagram",
    "linkedin"
  ],
  "social_url": "https://x.com/yourhandle"
}

Response

The generated content plan.

Example response

{
  "plan": {
    "id": "8c1f9a2e-3b7d-4c5e-9f01-2a3b4c5d6e7f",
    "app_id": "6820f3a4e7b91d003c45a1f2",
    "strategy": {
      "app_summary": "A CRM for freelancers who want to track leads without a spreadsheet.",
      "marketing_approach": "Lead with the spreadsheet pain, then show the app solving it.",
      "platforms": [
        {
          "reasoning": "Instagram rewards a consistent series, so these build on each other.",
          "posts": [
            {
              "id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
              "angle_label": "Pain point",
              "post_number": 1,
              "total_posts": 5,
              "suggested_day": 1,
              "rationale": "Opens on the spreadsheet frustration the audience already has.",
              "content": "Still tracking leads in a spreadsheet? I built the thing I wanted instead.",
              "image_url": "https://storage.base44.com/virality/3f2504e0.png",
              "image_prompt": "A freelancer closing a laptop at a tidy desk, warm morning light",
              "hashtags": [
                "freelance",
                "buildinpublic"
              ],
              "post_title": "I built a CRM because spreadsheets kept losing my leads",
              "suggested_subreddits": [
                "r/freelance",
                "r/SideProject"
              ],
              "launch_comment": "Happy to answer questions about how it works.",
              "option_label": "Direct and personal",
              "best_for_context": "Best if your audience already knows you"
            }
          ]
        }
      ]
    },
    "created_at": "2026-08-24T09:15:00+00:00",
    "updated_at": "2026-08-24T10:02:00+00:00"
  }
}

Changes