Generate a project update
POST
/ai/generate-update
Writes or rewrites a campaign update's text with an LLM. Requires a bearer session and is gated by the features.ai_update_generation flag. Throughput is capped per user inside the handler (10 requests per minute by default).
context.fundraiserTitle is required. Up to three context.previousUpdates are folded into the prompt for generate and improve.
Authorizations
BearerAuth
In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.
Type
HTTP (bearer)
Request Body
application/json
JSON
{
"action": "string",
"text": "string",
"context": {
"fundraiserTitle": "string",
"fundraiserId": "string",
"milestoneTitle": "string",
"previousUpdates": [
"string"
]
}
}
Responses
Generated text
application/json
JSON
{
"enhancedText": "string"
}