Verita GenAI Service API (1.2.0)

Download OpenAPI specification:

License: Proprietary

AI-powered service for post summarization, tag suggestions, and daily digest generation. Daily digest generation is asynchronous: internal callers submit a job, poll its status, and persist the final digest when the job succeeds.

Health

Health check

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "service": "GenAI Service"
}

GenAI

Summarize post content

Accepts post content and an optional post title, then returns exactly three concise bullet summaries generated by the configured LLM. This endpoint is called by the Content Service when a user requests summary generation for a post.

Authorizations:
internalServiceToken
Request Body schema: application/json
required
postId
required
string

ID of the post being summarized.

content
required
string [ 50 .. 50000 ] characters

Full post content to summarize.

title
string or null <= 300 characters

Optional post title for additional context.

Responses

Request samples

Content type
application/json
{
  • "postId": "123e4567-e89b-12d3-a456-426614174000",
  • "title": "GPT-5 Released: First Impressions and Benchmarks",
  • "content": "OpenAI just released GPT-5 with significant improvements in reasoning, code generation, and multimodal understanding. The model shows 40% improvement on HumanEval benchmarks and introduces a new thinking mode that makes its reasoning process transparent. Early benchmarks suggest it outperforms Claude and Gemini on most coding tasks, though it struggles with very long context windows. Pricing is set at $10/1M input tokens."
}

Response samples

Content type
application/json
{
  • "postId": "123e4567-e89b-12d3-a456-426614174000",
  • "summary": [
    ],
  • "model": "gemini-2.0-flash",
  • "usage": {
    }
}

Digests

Start daily digest generation

Creates an asynchronous in-memory job that generates a personalized text digest for the supplied topics and one-day period. The caller does not provide source items. GenAI fetches external sources internally from the MVP provider set: GitHub, GNews, and Hugging Face models/datasets.

The endpoint returns 202 Accepted because digest generation continues after the HTTP response. The caller must poll statusUrl until the job is SUCCEEDED or FAILED, then persist the result outside GenAI.

MVP limitations: job state is in-memory, lost on restart, and local to one GenAI service instance. Redis/Postgres or a queue-backed worker should replace this for production.

Authorizations:
internalServiceToken
Request Body schema: application/json
required
requestId
string <= 120 characters

Optional caller correlation ID. Echoed in job responses, but not treated as an idempotency key.

userId
string <uuid>

Optional user receiving the personalized digest. The caller owns durable user-to-digest mapping.

digestDate
required
string <date>

Calendar date represented by the digest in the requested timezone.

periodStart
required
string <date-time>

Inclusive start of the one-day content window.

periodEnd
required
string <date-time>

Exclusive end of the one-day content window. Must be after periodStart and no more than 24 hours later.

timezone
required
string

IANA timezone used to interpret digestDate and the one-day window.

required
Array of objects (DigestTopic) [ 1 .. 50 ] items

Topics the user is subscribed to, supplied by the internal caller.

maxSourcesPerTopic
integer [ 1 .. 20 ]
Default: 5

Optional final selected source limit per topic across all internal providers.

maxEvents
integer [ 1 .. 20 ]
Default: 8

Optional maximum number of digest events to return.

tone
string
Default: "technical"
Enum: "concise" "technical" "executive"

Optional writing style for the generated digest text.

Responses

Request samples

Content type
application/json
{
  • "requestId": "recommendation-2026-06-04-user-123",
  • "userId": "123e4567-e89b-12d3-a456-426614174000",
  • "digestDate": "2026-06-04",
  • "periodStart": "2026-06-03T00:00:00Z",
  • "periodEnd": "2026-06-04T00:00:00Z",
  • "timezone": "Europe/Berlin",
  • "topics": [
    ],
  • "maxSourcesPerTopic": 5,
  • "maxEvents": 8,
  • "tone": "technical"
}

Response samples

Content type
application/json
{
  • "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
  • "status": "QUEUED",
  • "statusUrl": "/api/v1/genai/digests/jobs/8df7f6e0-6c3f-4b82-8d90-7d3d5b8dc8e8",
  • "requestId": "string",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "submittedAt": "2019-08-24T14:15:22Z"
}

Get daily digest job status

Returns the current state of an asynchronous digest generation job. When the job status is SUCCEEDED, the response includes the generated digest result. When the job status is FAILED, the response includes an error; LLM provider failures are represented here with error.code = llm_error instead of an immediate 502 from the job creation endpoint.

Authorizations:
internalServiceToken
path Parameters
jobId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
  • "status": "QUEUED",
  • "requestId": "string",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "submittedAt": "2019-08-24T14:15:22Z",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "completedAt": "2019-08-24T14:15:22Z",
  • "warnings": [
    ],
  • "result": {
    },
  • "error": {
    }
}