AI review API
Review supplied data with the AI review API, including Docker self-hosting support.
The Review API also supports self-hosting with Docker. The Epismo endpoint and examples below use Epismo-managed models and account credits.
Generate an AI review from data supplied by your application. This endpoint uses a dedicated API key created in Settings → AI in the web app.
POST https://api.epismo.ai/v1/reviewsReview your own data without creating cases or playbooks. Include the information needed for the review in context. Web search depends on the key owner’s AI settings and model support.
Create and manage a key
Select the workspace or your personal account in the web app, then open Settings → AI → API keys. Enter a name and choose an expiration: 7, 30, or 90 days, 1 year, or no expiration. Copy the secret when it is created; it is only shown once.
- Workspace keys belong to the workspace and consume its shared credits. Only owners and admins can manage them. The workspace must have an active or trial subscription.
- Personal keys belong to you and consume your personal credits.
- Allow Epismo AI must be enabled for the key's owner.
The list shows the creator, creation time, expiration, and approximate last use. Revoke a key to stop its use immediately. You can permanently delete it after revocation; this does not remove its recorded usage. If you lose a secret, revoke the key and create another one. Key management is available through the web UI.
Track usage by API key in Credit management. Deleting a key keeps its recorded usage but groups it under Unknown.
Request
Send these headers:
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer <review-api-key> |
Content-Type |
Yes | application/json |
Idempotency-Key |
No | A UUID identifying this request; recommended for retries. |
Requests use the credits of the personal account or workspace that owns the key. You do not need to specify a billing account in the body.
| JSON field | Required | Description |
|---|---|---|
context |
Yes | JSON object containing the evidence to review; at most 500,000 UTF-8 bytes when serialized. |
instructions |
No | Additional review instructions; at most 32,000 UTF-8 bytes. |
criteria |
No | Optional natural-language evaluation criteria, at most 32,000 UTF-8 bytes. |
output_schema |
No | JSON Schema describing an object; at most 32,000 UTF-8 bytes when serialized. External schema references are disabled. Omit it to receive an object with a content string. When specified, output follows this exact schema, enabling structured health assessments, typed diagnostics, and automated workflows. |
model |
No | Supported model family or version; see the model list below. Omit to use the default model. Unsupported models and versions are rejected. |
The entire request body must fit within 600,000 bytes. Unknown fields are rejected. Omit optional fields instead of sending null.
Models
Use a family name to select its current version, or pin a version with @:
| Model | Supported versions |
|---|---|
gemini/argon |
4 |
gemini/flash |
3.8 |
claude/fable |
5.1 |
claude/opus |
5.5 |
claude/sonnet |
5.5 |
claude/haiku |
5.5 |
gpt/astra |
6 |
gpt/sol |
6.1 |
gpt/luna |
6 |
Minimal example
Set EPISMO_API_KEY to your secret. The minimal request only needs context in the body.
curl https://api.epismo.ai/v1/reviews \
--header "Authorization: Bearer $EPISMO_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"context":{"messages":[
{"role":"user","content":"What is 2 + 2?"},
{"role":"assistant","content":"5."}
]}}'Structured output and health assessment example
Just as Epismo evaluates case health internally, you can pair instructions with output_schema to produce a strictly typed JSON object instead of free-form prose. This allows you to evaluate operational health (healthy, at_risk, critical, or unknown), generate evidence-grounded summaries, and extract discrete risk factors and next actions.
curl https://api.epismo.ai/v1/reviews \
--header "Authorization: Bearer $EPISMO_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"instructions": "Objectively diagnose the health of the work as healthy, at_risk, critical, or unknown based on the supplied records. Avoid unsupported assumptions, and use unknown if the evidence is insufficient for a reliable diagnosis.",
"context": {
"milestone": "v2.0 Release",
"records": [
{"timestamp": "2026-10-25", "content": "Core API implementation complete and deployed to staging."},
{"timestamp": "2026-10-26", "content": "Load testing revealed a 15% timeout rate on the payment gateway. Root cause under investigation."}
]
},
"output_schema": {
"type": "object",
"properties": {
"health": {
"type": "string",
"enum": ["healthy", "at_risk", "critical", "unknown"],
"description": "Evidence-based health diagnosis"
},
"summary": {
"type": "string",
"description": "Current situation and primary reason for the health diagnosis (under 280 characters)"
},
"risks": {
"type": "array",
"items": { "type": "string" },
"description": "Concrete risks or stalled dependencies threatening the goal"
},
"next_actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": { "type": "string" },
"reason": { "type": "string" }
},
"required": ["title", "reason"]
},
"description": "Recommended next actions"
}
},
"required": ["health", "summary", "risks", "next_actions"]
}
}'The response output conforms strictly to the supplied schema without extraneous keys:
{
"run_id": "d09cf14f-b9c6-4481-902e-0cd7d8170d6e",
"output": {
"health": "at_risk",
"summary": "Core features are deployed, but frequent payment gateway timeouts during load testing threaten the on-schedule release.",
"risks": ["Intermittent payment gateway failures under load"],
"next_actions": [
{
"title": "Investigate payment gateway timeout bottlenecks",
"reason": "Identify root cause and tune connection pools and retry policies"
}
]
},
"verifications": [],
"credits_consumed": 5
}Enforcing strict schemas and enums guarantees type safety for downstream systems, making it straightforward to trigger automated alerts when health drops to at_risk or critical, sync status to internal dashboards, or drive CI/CD gates.
To continue an earlier review, pass its run_id as previous_run_id. The run must be a successful review accessible to the same API credential. Review uses its verifications to retain IDs for unchanged conditions; the current context remains the evidence for the new assessment. Omit the field to start a new review sequence. Reusing an idempotency key requires the same previous_run_id.
Response
The request returns HTTP 200 with the result when generation completes.
{
"run_id": "d09cf14f-b9c6-4481-902e-0cd7d8170d6e",
"output": {
"content": "The answer is incorrect: 2 + 2 equals 4, not 5."
},
"verifications": [],
"credits_consumed": 3
}Responses include run_id and a verifications array separate from output. Each verification contains a condition, origin, status, summary, and evidence with a context_path and exact quote from the supplied context. The root name verifications is reserved in output_schema. Successful executions retain input and final results; failures retain metadata and a safe failure code.
This is an illustrative response; content and credit usage vary. output follows output_schema when supplied. Credit usage depends on the model and actual token usage. Results are not saved as report history; keep the response in your application if needed.
Retries and errors
Idempotency-Key is optional. When omitted, each call starts a new review and can consume credits again, even with identical input. Empty or malformed headers are rejected with 400.
For applications that retry requests, generate a UUID before the first attempt and include it in the header:
IDEMPOTENCY_KEY=$(uuidgen)
# Add this header to curl, reusing the variable for retries:
# --header "Idempotency-Key: $IDEMPOTENCY_KEY"Reuse the same Idempotency-Key and identical input when retrying with the same API key. A completed request returns its saved result without another generation or charge. Reusing the UUID with different input returns a conflict. An operation already running with that key can also return a conflict; wait before retrying the identical request. Use a new UUID for a new review.
If a failed or interrupted execution has been recorded, starting another execution requires a new UUID. When available, its run ID is returned in the X-Review-Run-Id error header.
Errors have this shape:
{
"error": {
"message": "A review API key is required as a Bearer token."
}
}| Status | Meaning |
|---|---|
400 |
Invalid input, schema, model, or idempotency key. |
401 |
Missing, invalid, expired, or revoked API key. |
402 |
Insufficient credits. |
403 |
Review is not permitted by the owner's current settings or access requirements. |
409 |
Conflicting input or an operation already running for the idempotency key. |
413 |
Request body exceeds the size limit. |
415 |
Content type is not application/json. |
500, 503 |
Generation or a required service is unavailable. |
504 |
Generation timed out; use the guidance below for retries. |
Use bounded backoff for transient errors. After a network failure or uncertain response, reuse the original UUID if one was supplied. Without a supplied key, retrying can generate another review and consume additional credits.
Feedback and review memory
Supply previous_run_id to continue a successful review. Review checks access to included ancestors and supplies their recent feedback to generation and evaluation within the context budget, independently of optional memory search. This includes comments added to an older ancestor after a descendant ran.
Inaccessible ancestors or feedback that cannot be disclosed to the output audience fail explicitly. When history exceeds the context budget, the most recent feedback is considered and the limited historical coverage is disclosed. Changes to the selected feedback during execution prevent publication of a stale result. A legacy saved app report without a durable execution record can be an explicitly marked terminal ancestor; earlier history is reported as unavailable. Idempotent replays retain the original result; use a new execution to consider subsequent feedback.
Feedback targets a saved run_id. Include verification_id only when commenting on a particular verification returned in that run. IDs from another run are rejected. A whole-run comment can report an omitted issue or useful overall analysis. Feedback is commentary, not new evidence or an automatic correction of the saved verdict.
POST /v1/reviews/{runId}/feedback
Authorization: Bearer <review-api-key>
Content-Type: application/json{
"idempotencyKey": "c0f390ef-735d-4861-b1f0-1d2792119175",
"verification_id": "c7a39bae-d5a8-48ce-9642-ff0e67c4eeb3",
"content": "No approval record was supplied; that does not establish rejection."
}The server assigns the feedback ID. Optionally supply an idempotencyKey UUID; an identical retry with the same key returns the saved comment. Feedback is free-form text; no category is required. Content is required and limited to 8,000 UTF-8 bytes. GET on the same path returns the most recent 100 comments. DELETE /v1/reviews/{runId}/feedback/{feedbackId} removes the comment. Learned memory is maintained separately; delete a memory explicitly to remove it.
Memory is available to Review API keys and standalone deployments. Review API memory is isolated per API credential. Separate keys in the same workspace do not share memory. Rotating an active key replaces its secret while preserving the credential UUID, so its memory and review history remain accessible and its expiration stays unchanged. The old secret stops working immediately, and the new secret is displayed only once. Creating a new key is a separate credential and does not inherit the old key’s memory. App case, personal and team reports do not read or write memory. They retain original-source access and ancestor feedback.
The review agent can create, revise, consolidate and delete notes when useful. It preserves applicability and uncertainty in the Markdown itself. Feedback is not copied automatically: recent feedback from the same authenticated credential/deployment is supplied to subsequent reviews, even without previous_run_id. The agent interprets it alongside the current work and may retain a reusable lesson. The selected ancestor feedback is considered when continuing a review. Memory is advisory context, not evidence or new acceptance requirements.
GET /v1/memories?query=approval searches the authenticated namespace. Omit query to retrieve recent notes. An optional namespace_id must match the namespace granted by the key; it is a selector, not an access grant. DELETE /v1/memories/{memoryId} removes a note. There is no public memory creation or editing endpoint, and app OAuth cannot access these memory endpoints.
Each note contains id, namespace_id, Markdown content, lock_version, created_at, updated_at and an optional last_run_id. The note keeps its ID when revised. Agent changes commit atomically with a successful review; stale versions or deleted notes prevent publication rather than overwriting concurrent changes. Successful replays do not apply memory changes again.
Memory has its own lifetime: deleting review history clears its last_run_id reference without deleting the note. Deleting feedback does not automatically erase learned notes. Deleting a note does not redact historical review outputs or provider logs, and does not guarantee the agent will never learn the same lesson again from retained evidence.
Standalone configures caller credentials in EPISMO_API_KEYS, a JSON array of {namespace_id, key} entries in one process and one database. Keys with the same UUID share memory and retry identity, allowing overlap during rotation; different UUIDs are isolated. Restart after configuration changes. UUIDs are persistent configuration and must not be regenerated on restart or secret replacement. Callers cannot grant themselves a namespace through request input.
Provision reviews.sql, review_feedbacks.sql, and review_memories.sql in that order. No app account, team, case or playbook tables are required.
Self-host with Docker
Deploy the Review API with Docker in your own cloud or on-premises environment. Connect it to the models you use, including local LLMs and cloud model services.
We adapt the integration and implementation to your environment, including model connections, authentication, network requirements, and operational needs. Discuss your preferred models and deployment requirements with us to determine the right setup.
Contact sales to discuss self-hosting and deployment.
Use epismo report feedback create REPORT_ID --content "Your feedback" to add feedback from the CLI. Add --verification-id VERIFICATION_UUID for a specific verification. Use epismo report feedback list REPORT_ID to list comments and epismo report feedback delete REPORT_ID FEEDBACK_UUID to delete one. The same commands work with Case, Personal, and Team report IDs, subject to access permissions. To retry safely, supply the same --idempotency-key on each attempt. Later Case, Personal, and Team reports consider feedback from their report history against the current evidence.