Content Generation

Draft a document from an industry prompt

Generates a complete document from one of your industry's prompts in a single synchronous call. The prompt is resolved server-side against your organization's industry, grounded in your knowledge base, and written in the requested content type with your brand kit and product-line context applied. The document is not stored as content: the response carries it as GitHub Flavored Markdown with footnote citations, together with the sources behind it and a summary of what retrieval found, so you can review it or store it as content in a follow-up call. The call typically takes 10–30 seconds — set your client timeout accordingly. Each returned document consumes credits like an ad-hoc content generation; the balance is checked first, so an insufficient balance is a 402 before anything runs, and no credits are consumed unless a document is returned. A prompt that is not part of your organization's industry is a 404; an organization with no industry assigned is a 422. Requires the GEO product.

post/org/content-generation/industry-prompt-draft

Request

  • Base URL
    https://apiv2.senso.ai/api/v1
  • Auth
    API key in header X-API-Key

Request body

industry_prompt_idstring uuid required

The industry prompt to draft from. It must belong to your organization's industry — industry prompts are the prompts Senso runs for your sector, distinct from your organization's own prompts (GET /org/prompts), whose ids are not accepted here. A prompt from another industry is a 404.

selected_content_type_idstring uuid required

The content type that gives the document its format (GET /org/content-types). It must be one of your organization's content types; an id that does not resolve is a 400.

selected_product_line_idsstring[]

Product lines to include as context (up to 100). Omit to include all of your organization's product lines, up to the same limit.

audiencestring

Who the document is for. Defaults to a general audience.

style_tonestring

Voice and tone guidance for the writer. Defaults to professional, concise, and helpful.

extra_instructionsstring

Any further instructions for the writer, such as sections to include or claims to avoid.

Response

The generated document with its citations and a summary of what retrieval found.

industry_prompt_idstring uuid required

The industry prompt the document answers.

prompt_textstring required

The prompt's text as stored on the industry.

funnel_stagestring

The prompt's funnel stage as configured on the industry — for example awareness, consideration, evaluation, or decision. Free text whose casing varies between industries; omitted when the prompt has none.

document_markdownstring required

The document as GitHub Flavored Markdown. Citations appear as footnote references ([^1], [^2], …) whose definitions, at the end of the document, are links to the sources — each labelled with the source's title and pointing at its URL, which you can match against citations.

model_usedstring

The model that wrote the document.

notesstring[]

Caveats about this particular result — for example that retrieval found no usable context, so the document is not grounded in your knowledge base and its specifics should be treated as unverified. Omitted when there are none.

Example response

{
  "prompt_text": "How do I optimize my website content for AI search engines?",
  "content_type": {
    "name": "Article"
  },
  "citations": [
    {
      "id": "cite-1"
    }
  ],
  "usage": {
    "provider": "openai"
  }
}

Changes

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