generation

Generate platform-specific post copy

Runs the Cadencz agent graph (per platform) to turn one idea into publish-ready copy — in the workspace's learned voice, shaped to each platform's rules, and checked by the critic. Uses the tiered model router (no direct provider key needed).

post/api/v1/generation/text

Request

  • Base URL: https://api.cadencz.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.cadencz.com/api/v1/generation/text
  • Auth: HTTP bearer

Request body

inputstring required

Source material or instructions the model should turn into social copy.

platformsstring[]

One or more platform prompt templates to apply.

providerstring nullable

Text model provider. Defaults to TEXT_MODEL_PROVIDER.

modelstring nullable

Provider model id. Defaults to OPENAI_MODEL for the OpenAI provider.

brain_idstring nullable

Optional Brain id/slug used to ground the generation in saved product knowledge.

conversation_idstring nullable

Optional durable Brain conversation to continue. Requires brain_id; when omitted, a new conversation is created for Brain-backed generation.

conversation_messagestring nullable

User-visible conversation turn to persist. Defaults to input when omitted, allowing clients to keep generation-only prompt instructions out of conversation history.

brain_contextstring nullable

Optional client-provided Brain context fallback when the Brain is not yet saved server-side.

temperaturenumber
max_tokensinteger nullable
countinteger nullable

How many distinct post concepts to create. When omitted, Compose infers an explicit count from requests such as 'write two posts'.

content_guidancestring nullable

Selected content mode, kept separate from the user's requested subject.

Example request

{
  "brain_id": "brain_123",
  "conversation_id": "cnv_123",
  "conversation_message": "Turn our onboarding lesson into posts for this week.",
  "input": "We added Google sign-in and safer backend token validation.",
  "max_tokens": 500,
  "model": "gpt-5.4-mini",
  "platforms": [
    "twitter",
    "linkedin"
  ],
  "provider": "openai",
  "temperature": 0.7
}

Response

Successful Response

conversation_idstring nullable

Example response

{
  "conversation_id": "cnv_123",
  "outputs": [
    {
      "agent_run_id": "run_123",
      "model": "gpt-5.4-mini",
      "platform": "twitter",
      "provider": "openai",
      "text": "Google sign-in is now live, with backend token checks doing the heavy lifting."
    },
    {
      "agent_run_id": "run_124",
      "model": "gpt-5.4-mini",
      "platform": "linkedin",
      "provider": "openai",
      "text": "We shipped Google sign-in with backend token validation. The important part is less visible: the frontend handles identity, while the API owns authorization and database writes."
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.