The Capitol AI Services API acts as the interface between users and Capitol's AI-powered services, such as story generation.
**Features:**
- **User Management:** Create, update, and manage user accounts.
- **Session Handling:** Secure authentication and session management.
- **AI Content Generation:** Generate dynamic content like stories using AI.
https://api.capitol.ai
GET | /prompts |
GET | /events |
PATCH | /events |
DELETE | /events |
POST | /events |
PATCH | /events/bulk |
POST | /events/reorder |
POST | /events/turn-into |
GET | /api/v1/events |
DELETE | /api/v1/events |
PATCH | /api/v1/events/bulk |
POST | /api/v1/events/turn-into |
POST | /chat/async |
POST | /api/v1/chat/async |
GET | /health |
GET | /version |
GET | /ping-sentry |
POST | /auth/validate |
POST | /auth/check |
GET | /organizations |
POST | /organizations |
GET | /me |
api-version-string
1
document-id
api-version-string
1
Fetches a specific Capitol project using the project ID. A project contains various documents and sources uploaded or created by the user.
project-id
api-version-string
1
Updates a Capitol project with new or existing details, including its name and sources (PDFs, images, URLs).
api-version-string
project-id
pdf-sources
image-sources
url-sources
project-name
project-id
pdf-sources
image-sources
url-sources
project-name
project-id
pdf-sources
image-sources
url-sources
project-name
project-id
pdf-sources
image-sources
url-sources
project-name
1
{
"project-id": "4eb5a90f-b064-ad21-3e0a-fc8fe89f1bde",
"pdf-sources": [
"in ut id in eu",
null,
null,
"minim",
"laborum Excepteur cillum laboris officia"
],
"image-sources": [
"dolore in sunt",
"ad eu"
],
"url-sources": [
null,
"non dolore consequat laboris",
null
],
"project-name": "Excepteur tempor est Duis"
}
Deletes a specified Capitol project from the user's account based on the project ID.
project-id
api-version-string
1
Creates a new Capitol project where users can add sources (PDFs, images, URLs) and documents.
api-version-string
pdf-sources
image-sources
url-sources
project-name
pdf-sources
image-sources
url-sources
project-name
pdf-sources
image-sources
url-sources
project-name
pdf-sources
image-sources
url-sources
project-name
1
{
"pdf-sources": [],
"image-sources": [],
"url-sources": [
"velit amet cillum sunt Lorem",
null,
null
],
"project-name": "ut dolore velit laborum Ut"
}
Retrieves a list of all Capitol projects associated with the user, optionally including sources and allowing pagination through limit and offset parameters.
sources
limit
offset
api-version-string
1
Fetches all documents under a specified project ID, displaying all documents associated with the project.
offset
project-id
include-all-documents
api-version-string
1
Retrieves documents within a given project, with optional pagination using offset. Allows specifying a project ID.
offset
project-id
api-version-string
1
Transfers a document from one project to another, specified by document ID, origin project ID, and target project ID.
document-id
origin-project-id
project-id
api-version-string
1
Deletes a specified document from a project based on document ID.
document-id
project-id
api-version-string
1
Fetches all sources (PDFs, images, URLs) used in the documents of a specified project.
project-id
api-version-string
1
Copies a source (PDF, image, or URL) from one project to another, specified by origin project ID, target project ID, and source type.
origin-project-id
project-id
source-id
type
api-version-string
1
Removes a specific source from a project, based on project ID, source ID, and source type.
project-id
source-id
type
api-version-string
1
story-id
api-version-string
1
api-version-string
body
1
event-id
story-id
api-version-string
1
api-version-string
body
1
api-version-string
body
1
api-version-string
body
1
api-version-string
body
1
Fetches a list of events associated with a specific document (or story) by story-id. A document consists of multiple events, and may have several versions or iterations called drafts. Events can be modified individually or at the document level if changes are made across drafts.
story-id
api-version-string
1
Removes a particular event from a document draft, using the event-id and story-id to identify the specific event to delete.
event-id
story-id
api-version-string
1
Performs a bulk update across multiple events within a specified draft of a document, identified by draft depth. This operation can include modifying event content, adjusting draft-specific parameters, and adding or removing events. Events to delete can also be specified in the request.
api-version-string
story-id
draft-depth
draft-id
events
events-to-delete
story-id
draft-depth
draft-id
events
events-to-delete
story-id
draft-depth
draft-id
events
events-to-delete
story-id
draft-depth
draft-id
events
events-to-delete
1
{
"story-id": "a8faaeb4-60c6-7290-25f4-73681be8669e",
"events": [],
"events-to-delete": [
"ece1d353-1b35-57c0-bac0-7aa97d7cb331"
]
}
Modifies the type of an event block within a document, allowing any block type to be converted into another (e.g., from image to text or vice versa). This endpoint accepts parameters for customizing output type, subtype, and optionally specifying the draft and position within the document structure.
api-version-string
story-id
draft-id
event-id
block-id
output-sub-type
output-type
event-id-below
story-id
draft-id
event-id
block-id
output-sub-type
output-type
event-id-below
story-id
draft-id
event-id
block-id
output-sub-type
output-type
event-id-below
story-id
draft-id
event-id
block-id
output-sub-type
output-type
event-id-below
1
{
"story-id": "08e9c7af-892f-3e39-5de1-4e358759729a",
"draft-id": "487cd35f-8966-cb9d-19cb-781cc34939e9",
"event-id": "68eab21f-d684-a48f-8e23-b49f7e1012d6",
"block-id": "879ece9f-50ce-eeff-730c-0b9d68fc99c9",
"output-sub-type": "Lorem",
"output-type": "proident in",
"event-id-below": "32765da9-4e63-169c-9583-4057cb8c3e52"
}
api-version-string
body
1
api-version-string
body
1
story-id
api-version-string
1
Generates a WebSocket (WS) address for processing user-uploaded PDFs and URLs, enabling real-time communication for source processing.
api-version-string
ws-uuid
ws-uuid
ws-uuid
ws-uuid
1
{
"ws-uuid": "7a89af09-f7e9-37a6-7fa7-f4295b3c697a"
}
Accepts and processes user-provided sources (PDFs, URLs, etc.) asynchronously. Files are temporarily stored for 1 hour during processing. Returns a WebSocket URL for real-time processing status updates.
api-version-string
Unnamed Property
Unnamed Property
Unnamed Property
Unnamed Property
1
{}
Processes user-provided source data in JSON format, including source IDs, filenames, and data details, for seamless synchronization. Also accepts URLs as source-urls.
api-version-string
source-id
filename
generate-embedding
If true capitol will generate embeddings for the source
tags
taggs to segment data
data
Document in json format
source-url
source-id
filename
generate-embedding
If true capitol will generate embeddings for the source
tags
taggs to segment data
data
Document in json format
source-url
source-id
filename
generate-embedding
If true capitol will generate embeddings for the source
tags
taggs to segment data
data
Document in json format
source-url
source-id
filename
generate-embedding
If true capitol will generate embeddings for the source
tags
taggs to segment data
data
Document in json format
source-url
1
{
"source-id": "5d302ec7-1d07-3cd7-e51c-635ab4234019",
"filename": "ut",
"data": {},
"source-url": "anim pariatur ipsum ex ullamco"
}
Processes user-provided source data in PDF or Image format, including source IDs, filenames, and data details, for seamless synchronization.
api-version-string
source-id
filename
file
1
Fetches all sources associated with a specified story, identified by story ID, for streamlined access to related content.
story-id
draft-id
api-version-string
1
Checks if a given YouTube link is valid and can be processed, verifying compatibility for source integration.
api-version-string
url
url
url
url
1
{
"url": "elit amet quis"
}
Fetches data associated with a specified organization ID, enabling access to detailed information for specific sources metrics.
story-id
user-query
User query that was used to generate the story.
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
api-version-string
1
Fetch distinct values by key name
key-name
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
api-version-string
1
Exports source metrics to a CSV file for analysis and reporting purposes.
api-version-string
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
1
{
"story-id": [
"54b3150f-23d3-a076-b851-da0a2a5b932d",
"e9052f1b-c632-a3ec-9fee-e75f36901b65",
"e4c7b260-1f2c-156e-6cb5-d961160e6efd"
],
"parent-draft-id": [],
"draft-id": "10a8da4e-0ea7-ba56-e375-7c6d00192c01",
"draft-depth": -53633074,
"start-date": null,
"end-date": null,
"environment": "dolore",
"offset": 0,
"limit": 10
}
Exports source metrics to a JSON file for analysis and reporting purposes.
api-version-string
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
story-id
parent-draft-id
draft-id
draft-depth
start-date
Start date of the range in ISO 8601 format (YYYY-MM-DD)
end-date
End date of the range in ISO 8601 format (YYYY-MM-DD)
environment
offset
Offset
limit
Limit
1
{
"story-id": [
"3c12c86d-2935-49b5-da9d-b96161f7904a",
"3eff287b-8e30-f8b8-2e46-dad219f6054d",
"e3561524-2f43-8ab5-0065-966bbd03138c"
],
"end-date": null,
"environment": "in laboris ut cillum"
}
user-id
api-version-string
1
share-id
id
unfurl
api-version-string
1
api-version-string
body
1
id
api-version-string
1
api-version-string
body
1
story-id
migrated
api-version-string
1
id
api-version-string
1
api-version-string
body
1
api-version-string
body
1
Fetches the details of a story based on either share ID or story ID, with an optional parameter for unfurling.
share-id
id
unfurl
api-version-string
1
Updates a story in the database with modified details and an option to regenerate the unfurl.
api-version-string
updated-story
regenerate-unfurl
updated-story
regenerate-unfurl
updated-story
regenerate-unfurl
updated-story
regenerate-unfurl
1
{
"updated-story": {
"id": "4ff837a1-3bc6-152d-500f-32c735dbf6be",
"active-draft-id": "701b7e22-1257-29b8-ac72-cda2feccbf16",
"version": "dolor labore",
"headline-id": null,
"headline-event-id": null,
"chapters": [
{
"id": "d2e54aa3-fb4d-704a-3644-e64309de512c",
"block-type": "chapter",
"sections": [
{
"block-type": "section",
"id": "dc3e9874-f7fa-e92e-07a2-c2fd24eb6ee5",
"title": {},
"intro": {},
"palette": "et Duis minim cupidatat",
"show-headings": false,
"is-collpased": true,
"subsections": [],
"created-at": "sed",
"remix-suggestions": [
"Duis",
"fugiat eiusmod officia enim",
"magna reprehenderit consectetur proident tempor",
"ea sint ut occaecat"
],
"topics": [
"dolore esse voluptate Lorem",
"proident",
"officia aute",
"Ut cupidatat ex officia do"
]
},
{
"block-type": "section",
"id": "0d662ced-aa92-2898-fcc8-b9c95e4dbe43",
"title": {},
"intro": {},
"palette": "ipsum quis commodo fugiat consequat",
"show-headings": false,
"is-collpased": true,
"subsections": [
{
"block-type": "subsection",
"id": "e04d5132-eb02-b387-5812-922037034215",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "linkPreview",
"id": "45e64542-3111-f5e0-4f92-9e31f2c40773"
},
{
"block-type": "ai_generated_chart",
"id": "aa5f750b-cb00-d5b1-4310-b7655ba98f8b"
}
]
},
{
"block-type": "subsection",
"id": "e1d5e14c-0f8c-5a78-2738-a127d05c7aa4",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "quote",
"id": "01ff60fe-a337-38ab-8971-a5a582d82f80",
"quote": "elit culpa ad laborum sunt",
"event-id": "dolor ullamco anim laboris consectetur"
},
{
"block-type": "text",
"id": "9c54d707-dcfe-1309-cf6e-6e2ab76b9829",
"event-id": "dolor deserunt adipisicing anim"
},
{
"block-type": "image",
"id": "c0b2bd0c-d53a-8fd9-d2b3-edc9f765ef4c",
"src": "id",
"width": 14170198,
"height": -53154056,
"caption": "ut laboris",
"llm-selection": true,
"event-id": "voluptate dolor in in incididunt"
},
{
"block-type": "metrics",
"id": "4f9a1490-d404-3ca5-4edc-224cd432a905",
"metrics": [],
"llm-selection": true,
"event-id": "nulla",
"event-block-index": -36876048.70995198
}
]
},
{
"block-type": "subsection",
"id": "c268726c-003d-a3fb-89a8-5f32542aff35",
"row": "1",
"column": "2",
"blocks": []
}
],
"created-at": "proident esse officia adipisicing",
"remix-suggestions": [
"sit voluptate Duis occaecat",
"commodo Lorem fugiat",
"esse pariatur dolor",
"officia Excepteur ad labore commodo",
"dolore incididunt"
],
"topics": [
"consectetur cillum laborum",
"esse ut sint",
"sed aliqua nulla minim",
"veniam est aliqua ut",
"consectetur"
]
},
{
"block-type": "section",
"id": "b6e26586-4b5e-dd78-15b4-1ef1d87ce536",
"title": {},
"intro": {},
"palette": "occaecat",
"subsections": [
{
"block-type": "subsection",
"id": "23cca5d4-841d-9e12-745f-727f41dd6946",
"row": "1",
"column": "2",
"blocks": []
},
{
"block-type": "subsection",
"id": "05a1cd01-09e9-f50d-cb5d-da2bf5e5bdd9",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "quote",
"id": "6434535b-e01e-66c5-3fe1-0d3fff596727",
"quote": "incididunt consequat laborum exercitation voluptate",
"source-ids": [
"Excepteur veniam amet in Duis"
],
"event-id": "Lorem non voluptate",
"event-block-index": 26267441.57622008
}
]
},
{
"block-type": "subsection",
"id": "97941cd0-ec00-cf40-81ac-33d25cd50fe0",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "quote",
"id": "8ca1d5a1-afd8-5d10-af19-a82c583d4863",
"quote": "in",
"source-ids": [
"reprehenderit nulla",
"aliqua incididunt ad",
"dolore",
"anim"
],
"event-id": "in non sed sunt",
"event-block-index": 11881615.085299745
},
{
"block-type": "ai_generated_chart",
"id": "10cd1c2d-e0cb-5796-d143-5c4210bdc99e",
"event-block-index": -76515998.47071883
},
{
"block-type": "quote",
"id": "86fd65be-176b-3d5d-e0c5-f3ed88120cfc",
"quote": "est Ut sit Duis esse",
"source-ids": [
"ut quis Ut aliquip",
"mollit",
"ullamco",
"dolor in deserunt labore"
],
"event-id": "amet",
"event-block-index": -20753180.131132692
}
]
},
{
"block-type": "subsection",
"id": "861fee87-4681-6301-1c7e-53fc01704da0",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "quote",
"id": "d0c41aaa-2b5c-1567-4891-3711458318cd",
"quote": "ut do",
"event-id": "ullamco esse minim",
"event-block-index": 44469544.178507805
}
]
}
]
},
{
"block-type": "section",
"id": "80e934e1-468d-b95a-7258-7925cbb4324e",
"title": {},
"intro": {},
"palette": "ipsum nulla",
"show-headings": true,
"is-collpased": true,
"subsections": [
{
"block-type": "subsection",
"id": "fba8a051-6247-9b5f-5e39-0dbfbc8485b4",
"row": "2",
"column": "2",
"blocks": []
},
{
"block-type": "subsection",
"id": "d201291b-a5fe-1cb0-9e52-d9408872af60",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "image",
"block-subtype": null,
"id": "c8cac5ec-0391-91a6-5908-9f968f467416",
"src": "sed",
"original-image-source": "ipsum et",
"width": -26585769,
"height": 1803181,
"caption": "ut laborum cillum elit",
"llm-selection": false,
"show-caption": false,
"source-ids": [
"enim incididunt ut do culpa"
],
"event-id": "irure esse adipisicing non",
"event-block-index": -63223542.94166832,
"image-style": null,
"is-new": null,
"error-code": -8581602.127017528
},
{
"block-type": "image",
"block-subtype": null,
"id": "2de19365-1301-3f42-d3fa-61803a450924",
"src": "eiusmod in consequat",
"original-image-source": "velit ullamco mollit",
"width": -66420846,
"height": 57607044,
"caption": "laborum",
"llm-selection": true,
"show-caption": true,
"source-ids": [
"Excepteur Ut incididunt",
"ad reprehenderit adipisicing sint",
"sed consequat sit"
],
"event-id": "culpa ex",
"event-block-index": 4025205.3762988895,
"image-style": null,
"is-new": null,
"error-code": null
},
{
"block-type": "linkPreview",
"id": "5939ea2f-1170-e741-7640-86ca524526b1",
"url": "exercitation incididunt",
"image": "labore adipisicing"
},
{
"block-type": "linkPreview",
"id": "024261d8-9cd4-7369-63d8-30bb01cb0ab5",
"event-id": "elit",
"event-block-index": 4108354.1481764317,
"description": "pariatur",
"image": "incididunt aliquip",
"favicon": "do ad aliqua in exercitation",
"llm-selection": false
}
]
},
{
"block-type": "subsection",
"id": "4ca434ab-f155-94b8-45a4-006008af6a0e",
"row": "2",
"column": "1",
"blocks": []
},
{
"block-type": "subsection",
"id": "4e6fe537-e053-c812-1716-12c729d4ec0e",
"row": "1",
"column": "1",
"blocks": []
},
{
"block-type": "subsection",
"id": "7c156296-3726-d72c-8a2f-8c14bd3b4122",
"row": "1",
"column": "1",
"blocks": []
}
],
"created-at": "labore",
"remix-suggestions": [
"incididunt magna est",
"voluptate qui aliqua Duis in",
"non pariatur",
"occaecat",
"quis eiusmod"
],
"topics": [
"veniam occaecat in",
"eiusmod culpa nulla",
"proident fugiat",
"reprehenderit"
]
}
]
}
],
"created-at": "1897-08-04T20:34:09.0Z",
"updated-at": "1960-03-20T23:34:20.0Z",
"read-only": true,
"is-active": true,
"is-public": false,
"is-llm-generating": true,
"last-processed-llm-event-id": null,
"views-count": -39412632,
"like-count": -41347627,
"story-plan": "dolor",
"topics": [
"nostrud enim",
"elit",
"proident labore deserunt"
],
"has-liked-by-me": true,
"unfurl-image-url": "ea sint Lorem proident",
"active-section-index": 64443063,
"parent-story-id": "1382bdd0-baed-5a7b-4d3c-7359cbed07c5",
"current-depth-level": null,
"project-id": "c76023e4-84a7-d112-d3aa-5db600fbefaf"
},
"regenerate-unfurl": true
}
Removes a story from the database, identified by its ID.
id
api-version-string
1
Creates and saves a new story in the database with the provided content.
api-version-string
id
active-draft-id
version
perms
headline
headline-id
headline-event-id
authors
chapters
created-at
updated-at
read-only
is-active
is-public
is-llm-generating
last-processed-llm-event-id
views-count
like-count
story-plan
topics
has-liked-by-me
processed-llm-event-ids
unfurl-image-url
capitol-rank
active-section-index
banner
parent-story-id
current-depth-level
project-id
id
active-draft-id
version
perms
headline
headline-id
headline-event-id
authors
chapters
created-at
updated-at
read-only
is-active
is-public
is-llm-generating
last-processed-llm-event-id
views-count
like-count
story-plan
topics
has-liked-by-me
processed-llm-event-ids
unfurl-image-url
capitol-rank
active-section-index
banner
parent-story-id
current-depth-level
project-id
id
active-draft-id
version
perms
headline
headline-id
headline-event-id
authors
chapters
created-at
updated-at
read-only
is-active
is-public
is-llm-generating
last-processed-llm-event-id
views-count
like-count
story-plan
topics
has-liked-by-me
processed-llm-event-ids
unfurl-image-url
capitol-rank
active-section-index
banner
parent-story-id
current-depth-level
project-id
id
active-draft-id
version
perms
headline
headline-id
headline-event-id
authors
chapters
created-at
updated-at
read-only
is-active
is-public
is-llm-generating
last-processed-llm-event-id
views-count
like-count
story-plan
topics
has-liked-by-me
processed-llm-event-ids
unfurl-image-url
capitol-rank
active-section-index
banner
parent-story-id
current-depth-level
project-id
1
{
"id": "37be72d5-331a-d5f2-f22a-0658aed20a8b",
"chapters": [
{
"id": "0b1a1db4-ab84-1687-ba57-954c4ca8e271",
"block-type": "chapter",
"sections": [
{
"block-type": "section",
"id": "f2ac8310-608e-53fb-b0e1-caf3ec9c4245",
"title": {},
"intro": {},
"palette": "laboris anim nulla qui",
"show-headings": false,
"is-collpased": true,
"subsections": [
{
"block-type": "subsection",
"id": "bf790485-e05d-ebe4-db4a-419ecdc39512",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "linkPreview",
"id": "8313e29f-c3fc-805e-ce1a-1cc70d53fb99"
},
{
"block-type": "ai_generated_chart",
"id": "ad4fae52-c17f-6a12-66ed-241fd1fce413"
}
]
},
{
"block-type": "subsection",
"id": "e66613e9-c326-390e-1dff-3c3f42e3cfa5",
"row": "1",
"column": "2",
"blocks": [
{
"block-type": "ai_generated_chart",
"id": "50b6a22c-f5dd-fcec-a5d3-e585dacd1947",
"event-id": "enim nisi in officia Lorem",
"url": "sint cillum exercitation enim",
"event-block-index": -76632245.93368647,
"llm-selection": false,
"source-ids": [
"incididunt ullamco dolore"
]
},
{
"block-type": "metrics",
"id": "37f9fd11-dceb-f2d2-bd14-2d0d8040cc83",
"metrics": [
{
"data": "exercitation consectetur",
"descriptor": null,
"icon": {
"url": "dolore proident ut"
}
},
{
"data": 53079881.42865369,
"descriptor": "non occaecat pariatur",
"icon": {
"source": "ut reprehenderit laborum",
"url": "dolor amet Ut magna"
}
},
{
"data": "labore irure Duis officia",
"descriptor": "minim fugiat dolor cillum",
"icon": {
"url": "veniam nisi enim ex elit"
}
},
{
"data": 57610060.92999047,
"descriptor": null,
"icon": {
"url": "aute pariatur"
}
}
],
"source-ids": "irure",
"llm-selection": true,
"event-id": "enim exercitation pariatur Duis",
"event-block-index": -28773304.112406433
},
{
"block-type": "linkPreview",
"id": "646a8f8e-a0e4-a28b-1edd-05aa6c1d1a8e"
},
{
"block-type": "image",
"id": "6cd8bd58-c34b-3942-f277-45652e44f4bd",
"src": "sunt",
"original-image-source": "officia exercitation id",
"width": 6898000,
"height": 39624478,
"caption": "dolore dolor minim reprehenderit sint",
"llm-selection": true,
"show-caption": false,
"event-id": "deserunt commodo est ea non",
"error-code": -14559411.66670382
}
]
},
{
"block-type": "subsection",
"id": "2799a12f-cf53-e572-52ec-19cc07ec08f6",
"row": "2",
"column": "2",
"blocks": [
{
"block-type": "table",
"id": "252d880b-ea2a-1636-e95d-1e62bb989c09",
"event-id": "ut occaecat ad",
"event-block-index": -74843687.81938975,
"data": [],
"source-ids": []
},
{
"block-type": "table",
"id": "380d6468-a66a-ff7b-fa2e-5ac0b028f370",
"data": []
},
{
"block-type": "table",
"id": "dd0bb08d-4698-b941-fefc-c1a19221db85",
"event-id": "in proident",
"event-block-index": -72231365.035461,
"data": [],
"source-ids": [
"commodo nostrud laborum"
]
},
{
"block-type": "table",
"id": "e5cdfaea-987e-3b01-d568-b8689428eb81",
"event-id": "non ipsum",
"event-block-index": 63327021.17821193,
"data": [
[
"laborum ut non",
"nulla do aliqua ad aliquip",
"deserunt consequat Duis ea",
-34026642.590131395,
-6396316
],
[
-16986878,
-44805663.13931269,
-19172466.266137585,
21511385
]
],
"source-ids": [
"consectetur"
]
}
]
}
],
"created-at": "enim ipsum dolor pariatur",
"remix-suggestions": [
"deserunt consequat veniam do",
"aliquip ea cupidatat ipsum ullamco",
"quis",
"officia eiusmod Excepteur"
],
"topics": [
"nulla"
]
},
{
"block-type": "section",
"id": "0be7f809-d89a-203e-3a76-7ab9b85c0133",
"title": {},
"intro": {},
"palette": "reprehenderit proident ut sint officia",
"show-headings": true,
"is-collpased": true,
"subsections": [
{
"block-type": "subsection",
"id": "f6ed0722-cc2a-f764-c658-4fab7d4840ae",
"row": "1",
"column": "1",
"blocks": [
{
"block-type": "text",
"id": "06f91db2-aebb-6ab9-4208-ff366139a182",
"variant": "ut",
"source-ids": [],
"bans": [
{
"data": 97919118.972258,
"descriptor": null,
"icon": {
"url": "minim"
}
}
],
"event-id": "nisi",
"event-block-index": -64337305.97302074,
"is-new": true,
"error-code": -66342400.05158523
}
]
},
{
"block-type": "subsection",
"id": "39c3b426-325f-8d15-557d-c94351b87ecb",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "linkPreview",
"id": "f5b6a061-3f2d-38f7-093a-0c115a365763",
"url": "fugiat amet mollit est velit"
},
{
"block-type": "text",
"id": "098b617b-ca4f-6532-acc5-14c3905d4003",
"variant": "consequat",
"source-ids": [
"in officia Excepteur commodo pariatur",
"voluptate"
],
"bans": [],
"event-id": "eiusmod occaecat",
"event-block-index": -49479166.04429157,
"is-new": false,
"error-code": 94385127.8136374
},
{
"block-type": "image",
"block-subtype": "dolore incididunt consectetur Duis",
"id": "1e298973-a36a-61bc-ef44-f5fd245f2c1b",
"src": "quis ipsum Lorem",
"width": 1873990,
"height": -64878268,
"caption": "quis ex voluptate ut"
},
{
"block-type": "metrics",
"id": "f88f1168-3a92-5cd9-5c19-03ee9a12ecba",
"metrics": [
{
"data": "ullamco",
"descriptor": "laboris",
"icon": {
"url": "eiusmod sint ut nostrud irure"
}
},
{
"data": "dolore eiusmod commodo quis",
"descriptor": "nisi eu Ut sunt esse"
},
{
"data": "ullamco in",
"descriptor": "quis eiusmod reprehenderit do"
}
],
"source-ids": "aliqua",
"event-id": "pariatur aliqua",
"event-block-index": -81337849.03067438
},
{
"block-type": "text",
"id": "1ca29d2c-98c4-8aad-a54c-ef37303a0b6c",
"variant": "minim aliquip",
"bans": [
{
"data": "minim in",
"descriptor": "magna aute enim labore",
"icon": {
"source": "ut reprehenderit Duis proident aliquip",
"url": "non"
}
},
{
"data": 79643263.33329642,
"descriptor": "sint ex enim quis",
"icon": {
"url": "culpa ut qui enim"
}
},
{
"data": -24495447.44306627,
"descriptor": null,
"icon": {
"source": "reprehenderit in enim consectetur"
}
},
{
"data": 33840740.59691411,
"descriptor": null,
"icon": {
"source": "anim ipsum",
"url": "esse labore ullamco pariatur"
}
}
],
"event-id": "consectetur sint id anim",
"event-block-index": -14421230.37726,
"is-new": false,
"error-code": null
}
]
}
],
"created-at": "dolor anim ipsum dolor irure",
"remix-suggestions": [
"Ut Excepteur esse",
"dolor anim sunt",
"non",
"sint"
],
"topics": [
"in cupidatat dolore"
]
},
{
"block-type": "section",
"id": "9601dcde-1517-0546-3582-9fe31396be6d",
"title": {},
"intro": {},
"palette": "labore in fugiat adipisicing laborum",
"show-headings": true,
"is-collpased": false,
"subsections": [
{
"block-type": "subsection",
"id": "ef474209-d073-6b8f-cafb-e90aae23f5c6",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "text",
"id": "70aab574-6d71-9088-6f11-074b7a69b3a2",
"source-ids": [
"officia est",
"Excepteur incididunt nulla irure voluptate"
],
"error-code": null
},
{
"block-type": "metrics",
"id": "509f479e-8984-fb3a-9489-a5add1cc302f",
"metrics": [
{
"data": "velit",
"descriptor": "ullamco",
"icon": {
"source": "ipsum",
"url": "velit"
}
}
],
"llm-selection": true,
"event-id": "consectetur minim Excepteur tempor"
},
{
"block-type": "image",
"block-subtype": null,
"id": "d58cb3b8-aac9-d493-820b-b515182ae1d6",
"src": "aliquip Duis",
"original-image-source": null,
"width": -22993913,
"height": -23023470,
"caption": "dolore voluptate in sint",
"llm-selection": false,
"show-caption": true,
"event-id": "quis",
"image-style": null,
"is-new": false,
"error-code": null
}
]
},
{
"block-type": "subsection",
"id": "57652281-8f3a-10ef-8d72-ac456e9b55d2",
"row": "1",
"column": "2",
"blocks": []
},
{
"block-type": "subsection",
"id": "80fc40f1-dec5-f7d0-e26b-7b96a5a807d8",
"row": "1",
"column": "1",
"blocks": [
{
"block-type": "table",
"id": "3e94519c-48b0-6234-8c37-10fa5fb73798",
"event-block-index": -94285605.75035143,
"data": [
[
84494308.05924952,
"dolor in minim"
],
[
-49832201,
35263868,
"laboris ut Ut ipsum"
]
],
"source-ids": [
"Ut"
]
},
{
"block-type": "quote",
"id": "c53fa6a7-78bf-ff63-bbe6-18747a2c18a0",
"quote": "dolor",
"event-id": "anim ipsum consequat"
},
{
"block-type": "linkPreview",
"id": "0e2aaa12-1a6d-4030-9e17-dfd89305cee2",
"event-id": "ullamco pariatur eiusmod",
"event-block-index": 72105030.05895919,
"title": "qui dolore in incididunt",
"description": "Duis voluptate ullamco",
"url": "velit Duis",
"image": "ut adipisicing ex cupidatat",
"favicon": "in dolore ad mollit",
"llm-selection": true
}
]
}
],
"created-at": "adipisicing voluptate labore aute veniam",
"remix-suggestions": [
"esse Lorem est culpa in",
"esse elit fugiat"
],
"topics": []
},
{
"block-type": "section",
"id": "aaa00b32-0aaf-b695-2c03-01901aba323e",
"title": {},
"intro": {},
"subsections": [
{
"block-type": "subsection",
"id": "b3ffaffa-dd31-1747-6f92-b64bf50bd8ee",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "quote",
"id": "b92fea3d-4511-fdf8-0593-3bbc309d842f",
"quote": "nostrud fugiat",
"source-ids": [
"pariatur Ut occaecat",
"Excepteur aliquip magna"
],
"event-id": "occaecat dolore consequat sunt",
"event-block-index": 6317110.448434621
},
{
"block-type": "linkPreview",
"id": "aa3ff32d-900b-dd40-7aa0-17ae75b5487a",
"image": "est amet ad adipisicing nostrud",
"favicon": "nisi id sit voluptate"
},
{
"block-type": "text",
"id": "e109652e-b39e-c15a-31c4-ad161bba7844",
"variant": "dolor voluptate in",
"source-ids": [
"amet exercitation anim dolor",
"id sed et laborum"
],
"bans": [
{
"data": 4289336.740366295,
"descriptor": null
},
{
"data": "ipsum labore veniam deserunt cupidatat",
"descriptor": null
},
{
"data": "laboris",
"descriptor": null,
"icon": {
"source": "enim",
"url": "laboris sed"
}
},
{
"data": "et irure",
"descriptor": null,
"icon": {
"source": "reprehenderit laboris velit"
}
}
],
"event-block-index": 54191831.08189279,
"is-new": false,
"error-code": null
}
]
},
{
"block-type": "subsection",
"id": "06a8ec35-5713-7462-d090-fd37e3668b65",
"row": "1",
"column": "2",
"blocks": [
{
"block-type": "table",
"id": "05c1ef4d-cecf-cbb3-9cbc-c2ee98b4f351",
"event-id": "magna in deserunt",
"event-block-index": 99728807.09812525,
"data": [],
"source-ids": []
},
{
"block-type": "text",
"id": "8587ad58-9e10-4144-0371-95a2c3cdd741",
"event-id": "tempor"
},
{
"block-type": "ai_generated_chart",
"id": "3c206d87-b9db-325f-81b9-a7e2665135b2",
"event-id": "dolore ullamco",
"url": "in sint nisi consequat",
"event-block-index": 72161696.01005009,
"llm-selection": true,
"source-ids": []
},
{
"block-type": "linkPreview",
"id": "4bb41612-a5e7-5efe-ccd1-6bd9b56c40df",
"event-id": "nulla et",
"event-block-index": -19326344.09192829,
"title": "Ut",
"description": "consectetur sunt",
"url": "adipisicing",
"image": "nisi quis",
"favicon": "sit nisi",
"llm-selection": false
},
{
"block-type": "ai_generated_chart",
"id": "c5ced97d-c6dc-a6b9-68cc-218d536f370b",
"event-id": "est",
"url": "in aliqua culpa",
"llm-selection": false,
"source-ids": [
"quis",
"consectetur reprehenderit ea nulla",
"sed",
"Lorem in ullamco magna sed"
]
}
]
}
]
}
]
}
],
"created-at": "1898-06-18T18:35:19.0Z",
"views-count": -45502927,
"like-count": 58542242,
"active-section-index": 16125143
}
Retrieves the sequence of events for a particular story, identified by story ID.
id
api-version-string
1
Creates an independent copy of an existing story that can be modified and expanded upon by the user, regardless of whether they are the original author. The forked story is detached from the original author_id
, allowing full editing freedom without affecting the original story.
api-version-string
story-id
story-id
story-id
story-id
1
{
"story-id": "45ef6694-ca0d-bfd2-6698-985ed7760439"
}
Retries a story that failed to generate due to an error, allowing the user to retry the generation process with the same parameters and configurations.
api-version-string
story-id
draft-id
event-id
error-type
payload
story-id
draft-id
event-id
error-type
payload
story-id
draft-id
event-id
error-type
payload
story-id
draft-id
event-id
error-type
payload
1
{
"story-id": "94415a65-76b8-174f-509b-c8ee6f6af88c",
"draft-id": "4a23a84e-266a-5163-d9d1-2321079e813a",
"event-id": "a8be376a-b2e9-5912-220d-0ca5526a8b0c",
"error-type": "exercitation consequat ut Excepteur",
"payload": {}
}
Returns minimal information for a story, including ID and migration status, for lightweight requests.
story-id
migrated
api-version-string
1
Updates the visibility status of a story, allowing it to be made public or private based on the user's preference.
api-version-string
story-id
story-id
story-id
story-id
1
{
"story-id": "b51eede2-eb96-371a-4c56-70836858b116"
}
api-version-string
body
1
api-version-string
body
1
Creates a new version of a story by remixing it with optional user-defined configurations and a specified plan.
api-version-string
story-id
parent-draft-id
user-config-params
story-plan-config-id
story-id
parent-draft-id
user-config-params
story-plan-config-id
story-id
parent-draft-id
user-config-params
story-plan-config-id
story-id
parent-draft-id
user-config-params
story-plan-config-id
1
{
"story-id": "a0fb64e9-e651-629f-47e0-d840801a9ced",
"parent-draft-id": "laboris in",
"user-config-params": {},
"story-plan-config-id": "228ae108-1a63-5241-3947-c3b32b1a8152"
}
sort-by
topic-values
search-value
modes
own
private
delete
limit
offset
api-version-string
1
api-version-string
body
1
Initiates the document generation process and returns a WebSocket address for streaming events, including AI-generated segments. Requires either a story plan or story plan ID.
api-version-string
story-id
tags
project-id
user-config-params
story-plan-config-id
source-ids
story-id
tags
project-id
user-config-params
story-plan-config-id
source-ids
story-id
tags
project-id
user-config-params
story-plan-config-id
source-ids
story-id
tags
project-id
user-config-params
story-plan-config-id
source-ids
1
{
"story-id": "1123c6ba-87dc-6295-ba22-89ee06bc9fe8",
"tags": [],
"project-id": "c485de59-3fce-48cd-2398-06c7f82e8f88",
"user-config-params": {
"user-query": "Make a story"
},
"story-plan-config-id": "3cd81752-f9b9-6ba2-4239-c4a79e7fdb17",
"source-ids": []
}
api-version-string
body
1
Retrieve the complete chat history for a specific story or a component within a story. To access the entire story-level chat, omit the component-id parameter in the request.
story-id
Story ID
component-id
Component ID
api-version-string
1
Sends a new user message to the chat and returns an automated response from the agent.
api-version-string
story-id
Story ID
draft-id
Draft ID
draft-number
Draft number
block-id
Block ID
event-id
Event ID
user-chat-message
User chat message
user-chat-params
User chat params
new-block
New block
new-block-params
New block params
cyoa
CYOA
options
Options
custom-options
Custom options
topics
story-id
Story ID
draft-id
Draft ID
draft-number
Draft number
block-id
Block ID
event-id
Event ID
user-chat-message
User chat message
user-chat-params
User chat params
new-block
New block
new-block-params
New block params
cyoa
CYOA
options
Options
custom-options
Custom options
topics
story-id
Story ID
draft-id
Draft ID
draft-number
Draft number
block-id
Block ID
event-id
Event ID
user-chat-message
User chat message
user-chat-params
User chat params
new-block
New block
new-block-params
New block params
cyoa
CYOA
options
Options
custom-options
Custom options
topics
story-id
Story ID
draft-id
Draft ID
draft-number
Draft number
block-id
Block ID
event-id
Event ID
user-chat-message
User chat message
user-chat-params
User chat params
new-block
New block
new-block-params
New block params
cyoa
CYOA
options
Options
custom-options
Custom options
topics
1
{
"story-id": "00000000-0000-0000-0000-000000000000",
"draft-id": "00000000-0000-0000-0000-000000000000",
"draft-number": 0,
"block-id": "00000000-0000-0000-0000-000000000000",
"event-id": "00000000-0000-0000-0000-000000000000",
"user-chat-message": "User chat message",
"user-chat-params": {},
"new-block": false,
"new-block-params": {},
"cyoa": false,
"options": [],
"custom-options": [
33189771,
-4783096,
"irure"
],
"topics": []
}
Notifies the backend to reset the chat history for a designated block based on recent user actions.
api-version-string
story-id
draft-id
block-id
story-id
draft-id
block-id
story-id
draft-id
block-id
story-id
draft-id
block-id
1
{
"story-id": "2f4e617d-a74d-d9bf-5350-94f1b03b9fb3",
"draft-id": "5fa1885d-ea46-04f2-5d53-532ae4f7147d",
"block-id": "3715d8c0-7b0c-d419-41cb-3716b110eb07"
}
Generates a list of suggested prompts for modifying a specific content block, such as making a text block longer or more detailed.
api-version-string
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
1
{
"story-id": "0b3e23bc-8282-58da-7754-a7b4a6377e01",
"event-id": "ea10ea31-8bdc-5829-754a-4ea7ed5ae1e3",
"draft-id": "aute mollit dolore ut nulla"
}
Generates a list of suggested prompts for modifying a specific content block, such as making a text block longer or more detailed.
api-version-string
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
block-id
block-subtype
block-type
new-block
local-context
story-id
event-id
draft-id
1
{
"block-id": "440bb8e2-8232-4e49-0507-7091926a736f",
"block-subtype": "in",
"new-block": false,
"story-id": "Duis Lorem",
"event-id": "87576cf0-93f6-0843-5196-3d7fc7806a1a"
}
Generates a list of suggested prompts for modifying a completed draft.
api-version-string
story-id
Story ID
draft-id
Draft ID
story-id
Story ID
draft-id
Draft ID
story-id
Story ID
draft-id
Draft ID
story-id
Story ID
draft-id
Draft ID
1
{
"story-id": "00000000-0000-0000-0000-000000000000",
"draft-id": "00000000-0000-0000-0000-000000000000"
}
Stops the story generation process based on the provided story-id parameter.
api-version-string
external-id
external-id
external-id
external-id
1
{
"external-id": "f680c58c-f0a8-77b4-1910-2dd3d873082b"
}
1
Retrieve all scheduled pipelines for all organizations.
The list contains pipeline settings with either cron
or datetime_trigger
not null.
1
Note: this is only for M2M usage, not included in the /public/ routes. Look up an API key by its actual key value.
Args: api_key (str): The API key value to look up
Returns: APIKey: The API key configuration if found
Raises: HTTPException: If the API key is not found
api_key
The API key value to look up
1
1
Use to confirm which version is running. Pulls from pyproject.toml
1
Check sentry.io connection, should return a hash response
1
Validates an authentication token by forwarding it to the authentication service. Use the Authorize button to set the X-User-Token header.
authorization
1
Checks an authentication token by forwarding it to the authentication service (alias for /validate). Use the Authorize button to set the X-User-Token header.
authorization
1
List all Qdrant clusters for an organization.
Args: orgid (str): The organization ID.
Returns: List[OrgQdrantCluster]: List of Qdrant clusters.
Raises: HTTPException: If there's an error retrieving the clusters.
authorization
orgid
The ID of the organization owning the API key.
1
Create a new Qdrant cluster record for an organization.
Note: This only creates the cluster record, not the actual Qdrant instance. The actual Qdrant instance must be created separately.
Args: orgid (str): The organization ID. cluster_data (OrgQdrantClusterCreate): The Qdrant cluster data.
Returns: OrgQdrantCluster: The created Qdrant cluster.
Raises: HTTPException: If there's an error creating the cluster.
authorization
orgid
The ID of the organization owning the API key.
orgid
Organization ID
url
URL of the Qdrant cluster
ssm_parameter_arn
ARN of the API key in AWS SSM Parameter Store
1
{
"orgid": "org-123456",
"ssm_parameter_arn": "arn:aws:secretsmanager:region:account:secret:qdrant-api-key",
"url": "https://qdrant-cluster.example.com"
}
Get a specific Qdrant cluster by ID.
Args: orgid (str): The organization ID. cluster_id (str): The cluster ID.
Returns: OrgQdrantCluster: The Qdrant cluster.
Raises: HTTPException: If the cluster is not found or there's an error retrieving it.
authorization
orgid
The ID of the organization owning the API key.
cluster_id
Cluster ID
1
Update an existing Qdrant cluster.
Args: orgid (str): The organization ID. cluster_id (str): The cluster ID. updates (OrgQdrantClusterUpdate): The updates to apply to the cluster.
Returns: OrgQdrantCluster: The updated Qdrant cluster.
Raises: HTTPException: If the cluster is not found or there's an error updating it.
authorization
orgid
The ID of the organization owning the API key.
cluster_id
Cluster ID
url
URL of the Qdrant cluster
ssm_parameter_arn
ARN of the API key in AWS Secrets Manager
1
{
"ssm_parameter_arn": "arn:aws:secretsmanager:region:account:secret:updated-qdrant-api-key",
"url": "https://updated-qdrant-cluster.example.com"
}
Delete a Qdrant cluster. Note: This only deletes the cluster record, not the actual Qdrant instance.
Args: orgid (str): The organization ID. cluster_id (str): The cluster ID.
Raises: HTTPException: If the cluster is not found or there's an error deleting it.
authorization
orgid
The ID of the organization owning the API key.
cluster_id
Cluster ID
1
Retrieve changelog entries sorted by creation date (latest first).
Args: published_only (bool): If True, returns only published changelogs. If False, returns all changelogs.
Returns: List[Changelog]: A list of changelog entries sorted by creation date (latest first).
authorization
published_only
If True, returns only published changelogs. If False, returns all changelogs.
1
Create a new changelog entry.
Args: changelog (ChangelogCreate): The changelog entry to create.
Returns: Changelog: The created changelog entry.
authorization
service_name
The name of the service
release_id
The release identifier
release_date
The date when the release was published
notes
Release notes
published
Whether the changelog entry is published
1
{
"service_name": "platform-api",
"release_id": "v1.2.0",
"release_date": "2024-03-20T00:00:00Z",
"notes": "Added new features and fixed bugs.",
"published": false
}
Retrieve all changelog entries for a specific service.
Args: service_name (str): The service name.
Returns: List[Changelog]: A list of changelog entries for the specified service.
authorization
service_name
The name of the service to fetch changelog entries for.
1
Retrieve a specific changelog entry by ID.
Args: changelog_id (str): The changelog ID.
Returns: Changelog: The requested changelog entry.
authorization
changelog_id
The ID of the changelog entry to fetch.
1
Partially update an existing changelog entry. Only the provided fields will be updated, leaving other fields unchanged.
Args: changelog_id (str): The changelog ID. updates (ChangelogUpdate): The partial updates to apply to the changelog entry.
Returns: Changelog: The updated changelog entry.
authorization
changelog_id
The ID (uuid) of the changelog entry to update.
service_name
The name of the service
release_id
The release identifier
release_date
The date when the release was published
notes
Release notes
published
Whether the changelog entry is published
1
{
"release_date": "2024-03-21T00:00:00Z",
"notes": "Updated release notes.",
"published": true
}
Delete a changelog entry.
Args: changelog_id (str): The changelog ID.
authorization
changelog_id
The ID of the changelog entry to delete.
1
Fetch a specific API key for a given organization ID.
Args: orgid (str): The organization ID. id (str): The ID of the API key to fetch.
Returns: APIKey: The requested API key.
Raises: HTTPException: If the API key is not found for the organization.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
id
The unique ID of the API key to fetch.
1
Delete an existing API key for a given organization ID.
Args: orgid (str): The organization ID. id (str): The ID of the API key to delete.
Returns: dict: A message indicating successful deletion
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
id
The unique ID of the API key to delete.
1
Fetch all API keys for a given organization ID.
Args: orgid (str): The organization ID to fetch API keys for.
Returns: List[APIKey]: A list of API keys for the organization. Returns an empty list if no keys are found.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Insert a new API key for a given organization ID.
Args: orgid (str): The organization ID to create the API key for. api_key_create (ClientAPIKeyCreate): The API key configuration to insert.
Returns: APIKey: The inserted API key configuration.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
orgid
The organization ID (uuid)
key_name
Unique name of the API key
description
Description of the API key
api_key
The actual API key value
ssm_parameter_arn
SSM ARN (system generated)
active
Whether the API key is active
environment
Environment (dev or prod)
staging
dev
prod
1
{
"key_name": "openai_key",
"service_name": "OpenAI",
"description": "API key for OpenAI services",
"api_key": "sk-proj-secret-key-123456",
"active": true
}
Fetch all guardrail configurations for a given organization ID.
Args: orgid (str): The organization ID to fetch guardrails for. env (str): The environment to filter by (dev, staging, prod).
Returns: List[GuardrailConfig]: A list of guardrail configurations.
Example Response: [ { "environment": "dev", "examples": "User query: 'Generate a report that analyzes Elon Musk's impact on the Trump administration.' result: Pass. User query: 'Generate a report that analyzes Elon Musk's relationship to his kids and his former partner, Grimes.' result: Fail. User query: 'Generate a report on how to make a banana split.' result: Fail.", "updated_at": "2025-07-21T15:53:44.310+0000", "pass_criteria": "Includes content related to politics and policy.", "name": "Nonsense Guardrail", "created_at": "2025-07-21T15:53:44.310+0000", "active": true, "guardrail_id": "376764f3-ea56-41dc-bd8b-e0d8151cf2b0", "override": true, "fail_criteria": "Includes entertainment, sports, or non-policy topics.", "guardrail_description": "This test ensures the user doesn't enter nonsensical prompts.", "orgid": "a2a5dfe8-66bb-4eac-8f95-2d7352f3bd3c" } ]
Raises: HTTPException: If there's an error fetching guardrails.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Fetch a specific guardrail configuration for a given organization ID.
Args: orgid (str): The organization ID. guardrail_id (str): The specific guardrail ID to fetch. env (str): The environment to filter by (dev, staging, prod).
Returns: GuardrailConfig | None: The requested guardrail configuration, or 404 if not found.
Example Response: { "environment": "dev", "examples": "User query: 'Generate a report that analyzes Elon Musk's impact on the Trump administration.' result: Pass. User query: 'Generate a report that analyzes Elon Musk's relationship to his kids and his former partner, Grimes.' result: Fail. User query: 'Generate a report on how to make a banana split.' result: Fail.", "updated_at": "2025-07-21T15:53:44.310+0000", "pass_criteria": "Includes content related to politics and policy.", "name": "Nonsense Guardrail", "created_at": "2025-07-21T15:53:44.310+0000", "active": true, "guardrail_id": "376764f3-ea56-41dc-bd8b-e0d8151cf2b0", "override": true, "fail_criteria": "Includes entertainment, sports, or non-policy topics.", "guardrail_description": "This test ensures the user doesn't enter nonsensical prompts.", "orgid": "a2a5dfe8-66bb-4eac-8f95-2d7352f3bd3c" }
Raises: HTTPException: If no guardrail is found for the given organization and ID.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
guardrail_id
The ID of the guardrail to fetch.
1
Partially update specific fields of a guardrail configuration.
Args: orgid (str): The organization ID. guardrail_id (str): The specific guardrail ID to update. env (str, optional): The environment of the guardrail. updates (GuardrailUpdate): The fields to update.
Returns: GuardrailConfig: The updated guardrail configuration.
Example Response: { "environment": "dev", "examples": "This is an example of many examples", "updated_at": "2025-07-24T17:35:00.219Z", "pass_criteria": "Updated pass criteria", "name": "Updated Guardrail Name", "created_at": "2025-07-24T17:35:00.218Z", "active": "true", "guardrail_id": "376764f3-ea56-41dc-bd8b-e0d8151cf2b0", "override": "true", "fail_criteria": "Updated fail criteria", "guardrail_description": "Updated description for this guardrail", "orgid": "a2a5dfe8-66bb-4eac-8f95-2d7352f3bd3c" }
Raises: HTTPException: If the guardrail cannot be found or updated.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
guardrail_id
The ID of the guardrail to update.
name
guardrail_description
pass_criteria
fail_criteria
active
override
environment
examples
1
{
"name": "Updated Guardrail Name",
"guardrail_description": "Updated description for this guardrail",
"pass_criteria": "Updated pass criteria",
"fail_criteria": "Updated fail criteria",
"active": true,
"override": true,
"examples": "This is an example of many examples"
}
Delete a specific guardrail configuration for a given organization ID.
Args: orgid (str): The organization ID. guardrail_id (str): The specific guardrail ID to delete. env (str, optional): The environment of the guardrail.
Returns: dict: A response indicating success or failure.
Raises: HTTPException: If the guardrail cannot be deleted.
authorization
orgid
The ID of the organization owning the API key.
guardrail_id
The ID of the guardrail to delete.
1
Create a guardrail configuration from a description.
authorization
description
The description of the guardrail to create
1
{
"description": "do not allow non-fictional prompts"
}
Insert a new guardrail configuration for a given organization ID.
Args: guardrail (GuardrailConfig): The guardrail configuration to insert.
Returns: GuardrailConfig: The inserted guardrail configuration.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
guardrail_id
Unique identifier for the guardrail (will be generated if not provided)
name
Name of the guardrail
guardrail_description
Description of the guardrail
pass_criteria
Criteria for passing the guardrail
fail_criteria
Criteria for failing the guardrail
examples
Examples demonstrating the guardrail's behavior as a string
created_at
Timestamp of guardrail creation (will be generated on the server)
updated_at
Timestamp of last update (will be generated on the server)
active
Whether the guardrail is active
override
Whether the guardrail can be overridden
1
{
"guardrail_id": "376764f3-ea56-41dc-bd8b-e0d8151cf2b0",
"name": "Nonsense Guardrail",
"guardrail_description": "This test ensures the user doesn't enter nonsensical prompts.",
"pass_criteria": "Includes content related to politics and policy.",
"fail_criteria": "Includes entertainment, sports, or non-policy topics.",
"examples": "User query: 'Generate a report that analyzes Elon Musk's impact on the Trump administration.' result: Pass. User query: 'Generate a report that analyzes Elon Musk's relationship to his kids and his former partner, Grimes.' result: Fail. User query: 'Generate a report on how to make a banana split.' result: Fail.",
"created_at": "2025-01-23T18:08:08.275509Z",
"updated_at": "2025-02-10T14:39:05.381Z",
"active": true,
"override": true
}
Fetch guardrails failures for a given organization ID with filtering and pagination.
Args: name (Optional[str]): Filter by guardrail name environment (Optional[str]): Filter by environment offset (int): Starting position for pagination limit (int): Maximum number of results to return sort_by (Optional[str]): Field to sort by sort_order (str): Sort order ("asc" or "desc") start_date (Optional[str]): Start date in ISO format end_date (Optional[str]): End date in ISO format orgid (str): The organization ID to fetch guardrails failures for
Returns: GuardrailFailuresResponse: Guardrails failures with total count and results
Example Response: { "total": 1, "result": [ { "reason": "The user request is not valid as it may promote or glorify violence.", "name": "Violent Content", "userRequest": "Political violence", "timestamp": "2025-04-15T15:40:47Z", "environment": "QA", "namespace": "clj-dev" } ] }
authorization
name
Filter by guardrail name
env
The environment for the API key (e.g., 'prod', 'dev')
offset
Starting position for pagination
limit
Maximum number of results to return
sort_by
Field to sort by
sort_order
Sort order
asc
desc
start_date
Start date in ISO format (e.g., 2024-01-01)
end_date
End date in ISO format (e.g., 2024-12-31)
orgid
The ID of the organization to fetch guardrails failures for.
1
Fetch distinct guardrail failure names for a given organization ID.
Args: orgid (str): The organization ID to fetch distinct guardrail failure names for
Returns: GuardrailFailureNamesResponse: Response containing list of distinct guardrail failure names
Example Response: { "response": ["Political", "Violent Content"] }
authorization
orgid
The ID of the organization owning the API key.
1
Check a user prompt against the organization's guardrails.
Args: orgid (str): The organization ID to check guardrails for skip_override (bool): Skip guardrails that can be overridden (override=true) request (CheckPromptRequest): The request containing the story ID and user query
Returns: List[GuardrailCheckResult]: List of guardrail check results (empty if all pass)
Example Response: [ { "name": "Prueba Miguel", "reason": "The user request does not meet the pass criteria.", "success": false, "override": true } ]
authorization
skip_override
Skip guardrails that can be overridden (override=true)
orgid
The ID of the organization owning the API key.
story_id
user_query
1
{
"story_id": "00000000-0000-0000-0000-000000000000",
"user_query": "Generate a report on climate change policy"
}
Retrieve all capitol API keys across all organizations. This endpoint returns the actual API key values.
Args: env (str, optional): Filter by environment (staging, dev, prod)
Returns: List[APIKey]: A list of all capitol API keys with their actual key values.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
1
Retrieve all capitol API keys for a specific organization. This endpoint returns the actual API key values.
Args: orgid (str): The organization ID.
Returns: List[APIKey]: A list of capitol API keys with their actual key values.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Create a new clj-services API key with an automatically generated key value. The key will always have key_name="capitol".
Args: orgid (str): The organization ID to create the API key for. env (str): The environment for the API key (staging, dev, prod).
Returns: APIKey: The created API key configuration with the key value.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
orgid
The organization ID (will be taken from path parameter)
description
Description of the API key
name
Name of the API key
api_key
Optional custom API key value. If not provided, a key will be generated automatically.
1
{
"description": "My Custom API Key",
"name": "prod key"
}
Delete an existing API key for a given organization ID.
Args: orgid (str): The organization ID. key_name (str): The name of the API key to delete.
authorization
orgid
The ID of the organization owning the API key.
id
The uuid of the API key to delete.
1
Retrieve all organizations.
Args: request (Request): The incoming request
Returns: List[Organization]: A list of all organizations.
authorization
1
Create a new organization with an auto-generated ID or a custom ID
authorization
name
Name of the organization
orgid
Optional organization ID (UUID will be generated if not provided)
1
{
"name": "ACME Organization"
}
Retrieve all organizations the current user has been invited to.
This endpoint extracts the user's email from the JWT token in the headers and returns all organizations the user has been invited to.
Args: request (Request): The incoming request
Returns: List[Dict[str, Any]]: A list of organizations the user has been invited to
authorization
1
Retrieve a specific organization by ID.
Args: orgid (str): The organization ID.
Returns: Organization: The requested organization.
authorization
orgid
The ID of the organization owning the API key.
1
Update an existing organization.
Args: orgid (str): The organization ID. updates (OrganizationCreate): The updates to apply to the organization.
Returns: Organization: The updated organization.
authorization
orgid
The ID of the organization owning the API key.
name
Name of the organization
orgid
Optional organization ID (UUID will be generated if not provided)
1
{
"name": "Updated Organization Name"
}
Delete an organization.
Args: orgid (str): The organization ID.
authorization
orgid
The ID of the organization owning the API key.
1
Upload a logo for an organization.
Args: request (Request): The incoming request orgid: The organization ID file: The logo image file to upload
Returns: dict: A dictionary containing the URL of the uploaded logo
authorization
orgid
The ID of the organization owning the API key.
file
The logo image file to upload
1
Retrieve all Organization Members across all organizations.
Returns: List[Dict[str, Any]]: A list of all Organization Members.
authorization
1
Retrieve all Organization Members for a specific organization.
Args: orgid (UUID): The organization ID to get invites for.
Returns: List[Dict[str, Any]]: A list of Organization Members for the specified organization.
authorization
orgid
The organization ID to get invites for
1
Create a new organization invitation.
Args: orgid (UUID): The organization ID to invite the user to. invite (OrganizationMemberCreate): The invitation details.
Returns: OrganizationInvite: The created invitation with system-generated fields.
Raises: HTTPException: If an invitation for the email already exists for the organization.
authorization
orgid
The organization ID to member the user to
Email address of the invitee
origin
Origin of the invitation (max 40 characters)
role
Role to assign to the invitee (max 20 characters)
1
{
"email": "[email protected]",
"origin": "admin-portal",
"role": "editor"
}
Update an organization invitation role or status.
Args: orgid (UUID): The organization ID. invite_id (str): The ID of the organization member to update. update_data (OrganizationInviteUpdate): The updated member data.
Returns: OrganizationInvite: The updated invitation.
authorization
orgid
The organization ID
invite_id
The ID of the organization member to update
role
Updated role to assign to the invitee (max 20 characters)
status
Updated status of the invitation (pending, accepted, rejected)
1
{
"role": "admin"
}
Delete an organization invite.
Args: orgid (UUID): The organization ID. invite_id (str): The ID of the organization invite to delete.
authorization
orgid
The organization ID
invite_id
The ID of the organization member to delete
1
Accept an organization invitation.
Args: orgid (UUID): The organization ID. invite_id (str): The ID of the organization invite to accept.
Returns: OrganizationInvite: The updated invitation with accepted status.
authorization
orgid
The organization ID
invite_id
The ID of the organization member to accept
1
Accept an organization invitation.
Args: orgid (UUID): The organization ID. invite_id (str): The ID of the organization invite to accept.
Returns: OrganizationInvite: The updated invitation with accepted status.
authorization
orgid
The organization ID
invite_id
The ID of the organization member to accept
1
Retrieve all Organization Members for a specific email address.
Args: email (str): The email address to look up invites for.
Returns: List[Dict[str, Any]]: A list of Organization Members for the specified email address.
authorization
The email address to look up members for
1
Retrieve all prompts for a specific organization.
Args: orgid (str): The organization ID. is_example (bool, optional): Filter by example status. If true, returns example prompts. If false, returns suggested prompts. If not provided, returns all prompts.
Returns: List[OrgPrompt]: A list of organization prompts.
authorization
is_example
Filter by example status. If true, returns example prompts. If false, returns suggested prompts. If not provided, returns all prompts.
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Create a new organization prompt.
Args: prompt (OrgPromptCreate): The prompt to create.
Returns: OrgPrompt: The created prompt.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
orgid
The organization ID (will be taken from path parameter)
prompt
The prompt text
is_example
If true, this is an example prompt. If false, this is a suggested prompt.
environment
Environment (staging, dev, prod)
1
{
"prompt": "Generate a report on the latest political developments.",
"is_example": false
}
Retrieve a specific prompt for an organization.
Args: orgid (str): The organization ID. prompt_id (str): The prompt ID.
Returns: OrgPrompt: The requested prompt.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
prompt_id
The ID of the prompt to fetch.
1
Update an existing organization prompt.
Args: orgid (str): The organization ID. prompt_id (str): The prompt ID. updates (OrgPromptCreate): The updates to apply to the prompt.
Returns: OrgPrompt: The updated prompt.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
prompt_id
The ID of the prompt to update.
prompt
The prompt text
is_example
Whether this is an example prompt
1
{
"prompt": "Generate a report on the latest economic developments.",
"is_example": true
}
Delete an organization prompt.
Args: orgid (str): The organization ID. prompt_id (str): The prompt ID.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
prompt_id
The ID of the prompt to delete.
1
Regenerate prompts for a specific organization.
Args: orgid (str): The organization ID. env (str, optional): The environment to filter by.
Returns: dict: A success message and the list of regenerated prompts.
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Retrieve all pipeline basic settings for a specific organization.
Args: request (Request): The incoming request orgid (str): The organization ID.
Returns: List[PipelineBasicSettings]: A list of pipeline basic settings for the organization.
authorization
orgid
The ID of the organization owning the API key.
1
Create new pipeline basic settings for an organization.
Args: request (Request): The incoming request orgid (str): The organization ID. data (PipelineBasicSettingsCreate): The pipeline basic settings data to create.
Returns: PipelineBasicSettings: The created pipeline basic settings.
authorization
orgid
The ID of the organization owning the API key.
model
Model name
custom_instruction
Custom instruction
chain_of_thought
Chain of thoughts enabled
length
Length
language
Language
audience
Audience
cron
Cron expression for scheduling (optional, will be used for scheduled pipelines)
datetime_trigger
Datetime for scheduling (optional, will be used for scheduled pipelines)
1
{
"model": "gpt-4-turbo-preview",
"custom_instruction": "Analyze the document thoroughly and provide a comprehensive summary.",
"chain_of_thought": true,
"length": "3 pages",
"language": "en",
"audience": "general"
}
Retrieve specific pipeline basic settings by ID.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline basic settings ID.
Returns: PipelineBasicSettings: The requested pipeline basic settings.
Raises: HTTPException: If the pipeline basic settings are not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline basic settings to retrieve.
1
Update existing pipeline basic settings.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline basic settings ID. updates (PipelineBasicSettingsCreate): The updates to apply.
Returns: PipelineBasicSettings: The updated pipeline basic settings.
Raises: HTTPException: If the pipeline basic settings are not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline basic settings to update.
model
Model name
custom_instruction
Custom instruction
chain_of_thought
Chain of thoughts enabled
length
Length
language
Language
audience
Audience
cron
Cron expression for scheduling (optional, will be used for scheduled pipelines)
datetime_trigger
Datetime for scheduling (optional, will be used for scheduled pipelines)
1
{
"model": "gpt-4-turbo-preview",
"custom_instruction": "Analyze the document thoroughly and provide a comprehensive summary.",
"chain_of_thought": true,
"length": "3 pages",
"language": "en",
"audience": "general"
}
Delete pipeline basic settings.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline basic settings ID.
Raises: HTTPException: If the pipeline basic settings are not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline basic settings to delete.
1
Retrieve all pipeline blocks settings for a specific organization.
Args: request (Request): The incoming request orgid (str): The organization ID.
Returns: List[PipelineBlocksSettings]: A list of pipeline blocks settings for the organization.
authorization
orgid
The ID of the organization owning the API key.
1
Create new pipeline blocks settings for an organization.
Args: request (Request): The incoming request orgid (str): The organization ID. data (PipelineBlocksSettingsCreate): The pipeline blocks settings data to create.
Returns: PipelineBlocksSettings: The created pipeline blocks settings.
authorization
orgid
The ID of the organization owning the API key.
paragraphs
Enable/disable paragraphs blocks
headers
Enable/disable headers blocks
hero_image
Enable/disable hero image blocks
web_image
Enable/disable web image blocks
ai_image
Enable/disable AI image blocks
ai_charts
Enable/disable AI charts blocks
web_charts
Enable/disable web charts blocks
tables
Enable/disable tables blocks
metrics
Enable/disable metrics blocks
quotes
Enable/disable quotes blocks
lists
Enable/disable lists blocks
image_style
Style for generated images
argento
avery
bergman
buoyant
celray
faber
goldin
image_height
Height of generated images in pixels
image_width
Width of generated images in pixels
1
{
"paragraphs": true,
"headers": true,
"hero_image": true,
"web_image": true,
"ai_image": true,
"ai_charts": true,
"web_charts": true,
"tables": true,
"metrics": true,
"quotes": true,
"lists": true,
"image_style": "auto",
"image_height": 1024,
"image_width": 1024
}
Retrieve specific pipeline blocks settings by ID.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline blocks settings ID.
Returns: PipelineBlocksSettings: The requested pipeline blocks settings.
Raises: HTTPException: If the pipeline blocks settings are not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline blocks settings to retrieve.
1
Update existing pipeline blocks settings.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline blocks settings ID. updates (PipelineBlocksSettingsCreate): The updates to apply.
Returns: PipelineBlocksSettings: The updated pipeline blocks settings.
Raises: HTTPException: If the pipeline blocks settings are not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline blocks settings to update.
paragraphs
Enable/disable paragraphs blocks
headers
Enable/disable headers blocks
hero_image
Enable/disable hero image blocks
web_image
Enable/disable web image blocks
ai_image
Enable/disable AI image blocks
ai_charts
Enable/disable AI charts blocks
web_charts
Enable/disable web charts blocks
tables
Enable/disable tables blocks
metrics
Enable/disable metrics blocks
quotes
Enable/disable quotes blocks
lists
Enable/disable lists blocks
image_style
Style for generated images
argento
avery
bergman
buoyant
celray
faber
goldin
image_height
Height of generated images in pixels
image_width
Width of generated images in pixels
1
{
"paragraphs": true,
"headers": true,
"hero_image": true,
"web_image": true,
"ai_image": true,
"ai_charts": false,
"web_charts": true,
"tables": true,
"metrics": true,
"quotes": true,
"lists": true,
"image_style": "auto",
"image_height": 1792,
"image_width": 1024
}
Delete pipeline blocks settings.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline blocks settings ID.
Raises: HTTPException: If the pipeline blocks settings are not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline blocks settings to delete.
1
List all pipeline data settings for an organization
authorization
orgid
The ID of the organization owning the API key.
1
Create new pipeline data settings for an organization
authorization
orgid
The ID of the organization owning the API key.
search_sources
Dictionary containing search source configuration
search_depth
Search depth level (very shallow, shallow, default, deep, very deep)
very shallow
shallow
default
deep
very deep
existing_rag
Optional dictionary containing RAG data with user_pdf_documents and user_images
rag_collections
Optional list of RAG collection to use
1
{
"search_sources": {
"academic_web_search": false,
"web_search": false,
"use_perplexity": true
},
"search_depth": "deep",
"rag_collections": [
"collection-1",
"collection-2"
]
}
Retrieve specific pipeline data settings for an organization
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the settings to retrieve.
1
Update existing pipeline data settings
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the settings to update.
search_sources
Dictionary containing search source configuration
search_depth
Search depth level (very shallow, shallow, default, deep, very deep)
very shallow
shallow
default
deep
very deep
existing_rag
Optional dictionary containing RAG data with user_pdf_documents and user_images
rag_collections
Optional list of RAG collection to use
1
{
"search_sources": {
"academic_web_search": true,
"web_search": false,
"use_perplexity": false
},
"search_depth": "deep",
"rag_collections": [
"collection-3",
"collection-4"
]
}
Delete existing pipeline data settings
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the settings to delete.
1
Retrieve all pipeline layout settings for a specific organization.
Args: request (Request): The incoming request orgid (str): The organization ID.
Returns: List[PipelineLayoutSettings]: A list of pipeline layout settings for the organization.
authorization
orgid
The ID of the organization owning the API key.
1
Create new pipeline layout settings for an organization.
Args: request (Request): The incoming request orgid (str): The organization ID. data (PipelineLayoutSettingsCreate): The pipeline layout settings data to create.
Returns: PipelineLayoutSettings: The created pipeline layout settings.
authorization
orgid
The ID of the organization owning the API key.
blocks
List of layout blocks
1
{
"blocks": [
{
"type": "grouped_block",
"layout_block": {
"type": "grouped_block",
"id": "f1de780a-a2fe-469f-82de-8328f52378c8",
"repetition": 1,
"instructions": "Group containing multiple content blocks",
"blocks": [
{
"type": "block",
"block_type": "paragraph",
"id": "d2c0151f-b6ac-4f0b-9ec8-d6023c53f62d",
"repetition": 1,
"instructions": "Introduction paragraph"
},
{
"type": "block",
"block_type": "ai_image",
"id": "a3b4c5d6-e7f8-9g0h-1i2j-3k4l5m6n7o8p",
"repetition": 1,
"instructions": "Generate an image related to the content"
}
]
}
}
]
}
Retrieve specific pipeline layout settings by ID.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline layout settings ID.
Returns: PipelineLayoutSettings: The requested pipeline layout settings.
Raises: HTTPException: If the pipeline layout settings is not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline layout settings to retrieve.
1
Update existing pipeline layout settings.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline layout settings ID. updates (PipelineLayoutSettingsCreate): The updates to apply.
Returns: PipelineLayoutSettings: The updated pipeline layout settings.
Raises: HTTPException: If the pipeline layout settings is not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline layout settings to update.
blocks
List of layout blocks
1
{
"blocks": [
{
"type": "block",
"layout_block": {
"type": "block",
"block_type": "paragraph",
"id": "e0d67b9c-ecaf-4892-9e66-26ef4a4702f6",
"repetition": 1,
"instructions": "Updated instructions for paragraph"
}
},
{
"type": "grouped_block",
"layout_block": {
"type": "grouped_block",
"id": "4ad28f18-a43e-405e-9a1d-f10a5405a999",
"repetition": 1,
"instructions": "Updated group instructions",
"blocks": [
{
"type": "block",
"block_type": "ai_image",
"id": "b5c6d7e8-f9g0-h1i2-j3k4-l5m6n7o8p9q",
"repetition": 1,
"instructions": "Generate an updated image"
}
]
}
}
]
}
Delete pipeline layout settings.
Args: request (Request): The incoming request orgid (str): The organization ID. id (str): The pipeline layout settings ID.
Raises: HTTPException: If the pipeline layout settings is not found.
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the pipeline layout settings to delete.
1
authorization
orgid
The ID of the organization owning the API key.
1
authorization
orgid
The ID of the organization owning the API key.
settings_ids
List of pipeline settings IDs to delete
1
{
"settings_ids": [
"laboris esse commodo dolore anim"
]
}
authorization
orgid
The ID of the organization owning the API key.
name
Config name
basic_settings
Basic settings object
data_settings
Data settings object
blocks_settings
Blocks settings object
layout_settings
Layout settings object
1
{
"name": "My Pipeline Config",
"basic_settings": {
"model": "gpt-4-turbo-preview",
"custom_instruction": "Analyze the document thoroughly",
"chain_of_thought": true,
"length": "3 pages",
"language": "en",
"audience": "general"
},
"data_settings": {
"search_sources": {
"academic_web_search": true,
"web_search": false,
"use_perplexity": true
},
"search_depth": "deep",
"rag_collections": [
"collection-1",
"collection-2"
]
},
"blocks_settings": {
"paragraphs": true,
"headers": false,
"hero_image": false,
"web_image": false,
"ai_image": true,
"ai_charts": false,
"web_charts": false,
"tables": false,
"metrics": false,
"quotes": false,
"lists": false,
"image_style": "auto",
"image_height": 1024,
"image_width": 1024
},
"layout_settings": {
"blocks": [
{
"type": "block",
"layout_block": {
"type": "block",
"block_type": "paragraph",
"id": "f1de780a-a2fe-469f-82de-8328f52378c8",
"repetition": 1,
"instructions": "Write a detailed paragraph about the topic"
}
},
{
"type": "grouped_block",
"layout_block": {
"type": "grouped_block",
"id": "d2c0151f-b6ac-4f0b-9ec8-d6023c53f62d",
"repetition": 1,
"instructions": "Group containing multiple content blocks",
"blocks": [
{
"type": "block",
"block_type": "ai_image",
"id": "a3b4c5d6-e7f8-9g0h-1i2j-3k4l5m6n7o8p",
"repetition": 1,
"instructions": "Generate an image related to the content"
},
{
"type": "block",
"block_type": "paragraph",
"id": "b5c6d7e8-f9g0-h1i2-j3k4-l5m6n7o8p9q",
"repetition": 1,
"instructions": "Additional paragraph in the group"
}
]
}
}
]
}
}
authorization
format
Format of the response, e.g., 'clojure' for Clojure async format
orgid
The ID of the organization owning the API key.
settings_id
Settings ID
1
authorization
orgid
The ID of the organization owning the API key.
settings_id
Settings ID
name
Config name
basic_settings
Basic settings object
data_settings
Data settings object
blocks_settings
Blocks settings object
layout_settings
Layout settings object
1
{
"name": "Updated Pipeline Config Name",
"basic_settings": {
"model": "gpt-4-turbo-preview",
"custom_instruction": "New instruction",
"chain_of_thought": false,
"length": "2 pages",
"language": "en",
"audience": "business"
},
"data_settings": {
"search_sources": {
"academic_web_search": true,
"web_search": false,
"use_perplexity": true
},
"rag_collections": [
"collection-3",
"collection-4"
]
}
}
Convert PipelineSettings to Clojure async format and make a request to the async endpoint.
Args: orgid (str): The organization ID settings_id (str): The ID of the pipeline settings to use
Returns: dict: The response from the Clojure async endpoint
authorization
orgid
The ID of the organization owning the API key.
settings_id
Settings ID
user_query
1
{
"user_query": "Make a story about the capital of France"
}
Fetch source metrics from OpenSearch for a given organization ID with filtering and pagination.
Args: orgid (str): The organization ID to fetch source metrics for draft_depth (Optional[int]): Filter by draft depth env (str, optional): The environment to filter by parent_draft_id (Optional[str]): Filter by parent draft ID draft_id (Optional[str]): Filter by draft ID story_id (Optional[str]): Filter by story ID user_query (Optional[str]): Filter by user query offset (int): Starting position for pagination limit (int): Maximum number of results to return start_date (Optional[str]): Start date in ISO format end_date (Optional[str]): End date in ISO format
Returns: Dict[str, Any]: Source metrics with total count and results
authorization
draft_depth
Filter by draft depth
parent_draft_id
Filter by parent draft ID
draft_id
Filter by draft ID
story_id
Filter by story ID
user_query
Filter by user query
offset
Starting position for pagination
limit
Maximum number of results to return
start_date
Start date in YYYY-MM-DD format
end_date
End date in YYYY-MM-DD format
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Fetch distinct values for a specific field from OpenSearch for a given organization ID.
Args: orgid (str): The organization ID to fetch distinct values for key_name (str): The name of the field to get distinct values for (query parameter) env (str, optional): The environment to filter by draft_depth (Optional[int]): Filter by draft depth parent_draft_id (Optional[str]): Filter by parent draft ID draft_id (Optional[str]): Filter by draft ID story_id (Optional[str]): Filter by story ID user_query (Optional[str]): Filter by user query start_date (Optional[str]): Start date in ISO format end_date (Optional[str]): End date in ISO format
Returns: List[str]: List of distinct values for the specified field
authorization
key_name
The name of the field to get distinct values for
draft_depth
Filter by draft depth
parent_draft_id
Filter by parent draft ID
draft_id
Filter by draft ID
story_id
Filter by story ID
user_query
Filter by user query
start_date
Start date in YYYY-MM-DD format
end_date
End date in YYYY-MM-DD format
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Export source metrics to CSV or JSON.
This endpoint:
Args: orgid (str): The organization ID to export source metrics for format (str): Export format (csv or json) draft_depth (Optional[int]): Filter by draft depth env (str, optional): The environment to filter by parent_draft_id (Optional[str]): Filter by parent draft ID draft_id (Optional[str]): Filter by draft ID story_id (Optional[str]): Filter by story ID user_query (Optional[str]): Filter by user query start_date (Optional[str]): Start date in ISO format end_date (Optional[str]): End date in ISO format
Returns: Dict[str, str]: Information about the exported file including download URL
authorization
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
format
Export format (csv or json)
csv
json
draft_depth
Filter by draft depth
parent_draft_id
Filter by parent draft ID
draft_id
Filter by draft ID
story_id
Filter by story ID
user_query
Filter by user query
start_date
Start date in ISO format (e.g., 2024-01-01)
end_date
End date in ISO format (e.g., 2024-12-31)
1
{
"format": "csv",
"parent_draft_id": null,
"draft_id": null,
"story_id": "cillum deserunt aliqua id culpa",
"user_query": "eiusmod in minim commodo",
"end_date": null
}
Get the list of all accepted file types for uploads and max upload size.
Returns: dict: Upload policy details including accepted file types and max upload size.
authorization
1
List all collections for an organization.
Args: orgid (str): Organization ID (must be a valid UUID)
Returns: dict: Status and list of collections
authorization
orgid
The ID of the organization owning the API key.
1
Create a new collection (directory) for an organization.
Args: orgid (str): Organization ID (must be a valid UUID) collection (str): Collection name to create
Returns: dict: Status message confirming collection creation
authorization
collection
Name of the collection to create
orgid
The ID of the organization owning the API key.
1
List all files in a specific collection sub-directory for an organization.
Args: orgid (str): Organization ID (must be a valid UUID) collection (str): Collection name (sub-directory) order_by (str): Sort order - 'asc' for ascending, 'desc' for descending (default: 'asc')
Returns: dict: Status and list of files with metadata
authorization
order_by
Sort order for files: name_asc, name_desc, upload_asc, upload_desc, size_asc, size_desc
orgid
The ID of the organization owning the API key.
collection
Sub-directory within the organization folder
1
Delete an entire collection and all its files.
Args: orgid (str): Organization ID (must be a valid UUID) collection (str): Collection name to delete
Returns: dict: Status message with deletion summary
authorization
orgid
The ID of the organization owning the API key.
collection
Name of the collection to delete
1
Upload files to a collection in s3 Args: files (List[UploadFile]): List of files to upload orgid (str): Organization ID (must be a valid UUID) collection (str): Collection name Returns: dict: Status and list of uploaded file URLs
authorization
orgid
The ID of the organization owning the API key.
collection
Optional sub-directory within the organization folder
files
Files to upload
1
Delete a specific file from a collection sub-directory in S3.
Args: orgid (str): Organization ID (must be a valid UUID) collection (str): Collection name (sub-directory) filename (str): Name of the file to delete
Returns: dict: Status message confirming deletion
authorization
orgid
The ID of the organization owning the API key.
collection
Sub-directory within the organization folder
filename
Name of the file to delete
1
Fetch daily generation metrics from OpenSearch for a given organization ID.
Returns counts of generations by status (success, failure, active) for each day in the specified date range.
A generation is considered active if its latest record has status="active".
Args: orgid (str): The organization ID to fetch metrics for start_date (Optional[str]): Start date in YYYY-MM-DD format (defaults to 30 days ago) end_date (Optional[str]): End date in YYYY-MM-DD format (defaults to today) env (str): The environment to filter by
Returns: Dict[str, Any]: Daily generation metrics with counts by status
authorization
start_date
Start date in YYYY-MM-DD format (defaults to 30 days ago)
end_date
End date in YYYY-MM-DD format (defaults to today)
env
The environment for the API key (e.g., 'prod', 'dev')
orgid
The ID of the organization owning the API key.
1
Fetch generation records from OpenSearch for a given organization ID with filtering and pagination.
Returns the latest status for each external_id based on the sort criteria.
Args: orgid (str): The organization ID to fetch generations for status (Optional[str]): Filter by status (active, failure, success) offset (int): Starting position for pagination limit (int): Maximum number of results to return start_date (Optional[str]): Start date in YYYY-MM-DD format end_date (Optional[str]): End date in YYYY-MM-DD format env (str): The environment to filter by sort_by (str): Field to sort by sort_order (str): Sort order (asc or desc)
Returns: Dict[str, Any]: Generation records with total count and results
authorization
status
Filter by status
offset
Starting position for pagination
limit
Maximum number of results to return
start_date
Start date in YYYY-MM-DD format
end_date
End date in YYYY-MM-DD format
env
The environment for the API key (e.g., 'prod', 'dev')
sort_by
Field to sort by
sort_order
Sort order (asc or desc)
orgid
The ID of the organization owning the API key.
1
Auto generate a binary evaluation config.
Args: input_config: The input configuration for the auto generate binary evaluation config.
Returns: The auto generated binary evaluation config.
authorization
model
gpt-4o-mini
gpt-4o
claude-sonnet-3.5
claude-sonnet-3.7
cerebras-llama-3.3-70b
eval_desc
na_allowed
1
{
"model": "gpt-4o-mini",
"eval_desc": "ut nulla dolor tempor sit",
"na_allowed": true
}
Auto generate a score evaluation config.
Args: input_config: The input configuration for the auto generate score evaluation config.
Returns: The auto generated score evaluation config.
authorization
model
gpt-4o-mini
gpt-4o
claude-sonnet-3.5
claude-sonnet-3.7
cerebras-llama-3.3-70b
eval_desc
min_score
max_score
1
{
"model": "gpt-4o",
"eval_desc": "in Excepteur magna do",
"min_score": 75186824,
"max_score": -38940173
}
GET /tests/{org_id}
authorization
org_id
1
GET /test/{org_id}/{test_id}
authorization
org_id
test_id
1
PATCH /test/runs/{org_id}/{test_id}
authorization
org_id
test_id
id
name
evaluations
test_type
content_test
pipeline_test
test_config
1
{
"evaluations": [
"example-eval-id-1",
"example-eval-id-2"
],
"id": "example-test-id",
"name": "example-test-name",
"test_config": {
"urls": [
"example-url-1",
"example-url-2"
]
},
"test_type": "content_test"
}
DELETE /test/{org_id}/{test_id}
authorization
org_id
test_id
1
POST /{org_id}/tests
authorization
org_id
id
name
evaluations
test_type
content_test
pipeline_test
test_config
1
{
"id": "occaecat laborum consequat",
"name": "ex aute ut eu",
"evaluations": [],
"test_type": "content_test",
"test_config": {
"additional_instructions": "example-additional-instructions",
"urls": [
"https://www.example.com",
"https://www.example.com/2"
]
}
}
PUT /{org_id}/tests/{test_id}
authorization
org_id
test_id
1
GET /test/runs/{org_id}/{test_id}
authorization
org_id
test_id
1
authorization
org_id
test_id
run_id
1
List all evaluations for an organization.
Args: org_id: The ID of the organization to list evaluations for.
Returns: A list of evaluations for the organization.
authorization
org_id
The ID of the organization to list evaluations for.
1
Create a new evaluation.
Args: org_id: The ID of the organization to create the evaluation for. eval_data: The data of the evaluation to create.
Returns: The created evaluation.
authorization
org_id
The ID of the organization to create the evaluation for.
id
name
description
model
gpt-4o-mini
gpt-4o
claude-sonnet-3.5
claude-sonnet-3.7
cerebras-llama-3.3-70b
type
score
binary
eval_config
1
{
"description": "check if the document is relevant to the query",
"eval_config": {
"failCriteria": "document is not relevant to the query",
"naCriteria": "relevancy could not be determined",
"passCriteria": "document is relevant to the query"
},
"id": "example-eval-id",
"name": "relevance check evaluation",
"type": "binary"
}
Get a single evaluation by ID.
Args: org_id: The ID of the organization to get the evaluation for. eval_id: The ID of the evaluation to get.
Returns: A single evaluation.
authorization
org_id
The ID of the organization to get the evaluation for.
eval_id
The ID of the evaluation to get.
1
Update an evaluation.
Args: org_id: The ID of the organization to update the evaluation for. eval_id: The ID of the evaluation to update. eval_data: The data of the evaluation to update.
Returns: The updated evaluation.
authorization
org_id
The ID of the organization to update the evaluation for.
eval_id
The ID of the evaluation to update.
id
name
description
model
gpt-4o-mini
gpt-4o
claude-sonnet-3.5
claude-sonnet-3.7
cerebras-llama-3.3-70b
type
score
binary
eval_config
1
{
"id": null,
"name": "Excepteur fugiat deserunt sit",
"description": "sit",
"model": "cerebras-llama-3.3-70b",
"type": "binary",
"eval_config": {
"additional_instructions": "example-additional-instructions",
"fail_criteria": "document is not relevant to the query",
"na_criteria": "relevancy could not be determined",
"pass_criteria": "document is relevant to the query"
}
}
Delete an evaluation.
Args: org_id: The ID of the organization to delete the evaluation for. eval_id: The ID of the evaluation to delete.
authorization
org_id
The ID of the organization to delete the evaluation for.
eval_id
The ID of the evaluation to delete.
1
authorization
userid
User ID
1
authorization
userid
User ID
format_ids
List of format settings IDs to delete
1
{
"format_ids": [
"nulla adipisicing"
]
}
authorization
userid
User ID
1
{
"description": "Web sourced, multimedia article",
"configName": "custom",
"configDisplayName": "3 lists",
"isDefault": false,
"storyplan": {
"responseModel": "gpt_4_omni_128k",
"webGraphs": false,
"format": "custom",
"tweetCharacterLimit": 280,
"responseStructure": [
{
"id": "4117b4ae-9797-4258-a3a7-71b32ccf0098",
"type": "block",
"blockType": "list",
"repetition": 1,
"instructions": ""
},
{
"id": "7e1974da-f64c-46a3-bae2-f6c015e1762c",
"type": "block",
"blockType": "list",
"repetition": 1,
"instructions": ""
}
],
"academicWebSearch": false,
"aiImages": false,
"imageWidth": 1344,
"lists": true,
"cot": false,
"images": false,
"userUrls": [],
"userImages": [],
"userPreProcessedSources": [],
"generalWebSearch": false,
"heroImage": false,
"tables": false,
"paragraphs": false,
"imageHeight": 768,
"title": true,
"responseLanguage": "english",
"headers": false,
"userPdfDocuments": [],
"customInstructions": "12",
"usePerplexity": false,
"quotes": false,
"userPdfUrls": [],
"audience": "General",
"ragBudget": "default",
"aiGraphs": false,
"metrics": false,
"imageStyle": "auto",
"tweets": false
}
}
authorization
userid
User ID
format_id
Format Settings ID
1
authorization
userid
User ID
format_id
Format Settings ID
1
{
"description": "Updated description",
"configDisplayName": "Updated 3 lists",
"isDefault": true
}
Retrieve audit trail history for an organization with optional filters
authorization
table_name
Filter by table name
record_id
Filter by record ID
user_email
Filter by user email
action
Filter by action type (create, update, delete)
start_date
Start date in ISO format (YYYY-MM-DD)
end_date
End date in ISO format (YYYY-MM-DD)
limit
Maximum number of results
offset
Starting offset for pagination
orgid
The ID of the organization owning the API key.
1
Retrieve complete audit history for a specific record
authorization
limit
Maximum number of results
orgid
The ID of the organization owning the API key.
table_name
Table name
record_id
Record ID
1
Retrieve activity history for a specific user in an organization
authorization
start_date
Start date in ISO format (YYYY-MM-DD)
end_date
End date in ISO format (YYYY-MM-DD)
limit
Maximum number of results
orgid
The ID of the organization owning the API key.
user_email
User email
1
Retrieve list of tables that have audit trail data
authorization
orgid
The ID of the organization owning the API key.
1
Retrieve list of actions that have audit trail data
authorization
orgid
The ID of the organization owning the API key.
1
List all agentic search apps for an organization
authorization
orgid
The ID of the organization owning the API key.
1
Create a new agentic search app for an organization
authorization
orgid
The ID of the organization owning the API key.
app_name
Name of the agentic search app
app_description
Description of the agentic search app (supports HTML)
primary_color
Primary color in hex format (e.g., #ff4136)
background_color
Background color in hex format (e.g., #ccc)
logo_url
URL or filename for the app logo
1
{
"app_name": "Agento Lookup",
"app_description": "<b>We can find anything!</b>",
"primary_color": "#ff4136",
"background_color": "#cccccc",
"logo_url": "agento.png"
}
Retrieve specific agentic search app for an organization
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the agentic search app to retrieve.
1
Update existing agentic search app
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the agentic search app to update.
app_name
Name of the agentic search app
app_description
Description of the agentic search app (supports HTML)
primary_color
Primary color in hex format (e.g., #ff4136)
background_color
Background color in hex format (e.g., #ccc)
logo_url
URL or filename for the app logo
1
{
"app_name": "Updated App Name",
"primary_color": "#0074d9"
}
Delete existing agentic search app
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the agentic search app to delete.
1
Download the agentic search app configuration as a JSON file
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the agentic search app to download.
1
Upload a logo image (PNG or JPG) for an agentic search app
authorization
orgid
The ID of the organization owning the API key.
id
The ID of the agentic search app to update with logo.
file
Logo image file (PNG or JPG format, max 5MB)
1
Generate a temporary URL to access the agentic search app logo in browser
authorization
expiration
URL expiration time in seconds (default: 1 hour)
orgid
The ID of the organization owning the API key.
id
The ID of the agentic search app.
1
Register a new user with email and password. Returns a JWT token for immediate authentication.
first_name
User's first name
last_name
User's last name
User's email address
password
User's password (minimum 8 characters)
mobile
User's mobile number
username
Unique username
1
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"password": "securepassword123",
"mobile": "+1234567890",
"username": "johndoe"
}
Login with email and password to receive a JWT token for API access.
User's email address
password
User's password
1
{
"email": "[email protected]",
"password": "securepassword123"
}
Get the profile information of the currently authenticated user. Requires a valid JWT token in the Authorization header.
1
Returns the current API version.
api-version-string
1
title
User query
api-version-string
1
api-version-string
source-uuid
ws-uuid
project-id
Project ID
source-uuid
ws-uuid
project-id
Project ID
source-uuid
ws-uuid
project-id
Project ID
source-uuid
ws-uuid
project-id
Project ID
1
{
"source-uuid": "95ec6225-8c53-da86-bfc0-1e646e1dda77",
"ws-uuid": "ff11709a-2d69-2944-51b0-d3ad06bb6e3e",
"project-id": "fe2278b5-25ba-3796-61b8-891033420b25"
}
Fetches the details of the current organization
organization-id
api-version-string
1
Updates the details of an organization
api-version-string
name
image-url
name
image-url
name
image-url
name
image-url
1
{}
Deletes an organization by ID.
Restrictions:
- Only available in development and feature environments
- Requires administrator privileges
- Cannot be undone
This endpoint is intended for testing and development purposes only.
organization-id
api-version-string
1
Creates a new organization for the user
api-version-string
name
image-url
name
image-url
name
image-url
name
image-url
1
{
"name": "esse ullamco",
"image-url": "ex"
}
Fetches all organizations
api-version-string
1
Allows the user to upload a logo.
api-version-string
file
1
Fetches all api keys for the organization
api-version-string
1
Updates the name of an api key
api-version-string
api-key-id
name
domain
api-key-id
name
domain
api-key-id
name
domain
api-key-id
name
domain
1
{
"api-key-id": "ebeaf3ef-d8bb-712e-4bd7-1fa55058b56c",
"name": "dolore Excepteur"
}
Deletes an api key by id
api-key-id
api-version-string
1
Creates a new api key for the organization
api-version-string
name
domain
name
domain
name
domain
name
domain
1
{
"name": "ullamco do mollit id",
"domain": "do nostrud fugiat ut ipsum"
}
Fetches all models for the organization
organization-id
api-version-string
1
Upsert the primary and seconday model for an organization
api-version-string
organization-id
primary-model
secondary-model
organization-id
primary-model
secondary-model
organization-id
primary-model
secondary-model
organization-id
primary-model
secondary-model
1
{
"organization-id": "7d5abfab-414d-f461-e181-15a41d5a328e",
"primary-model": "non laborum",
"secondary-model": "aute amet"
}
Fetches all models for the organization
api-version-string
1
Fetches all members of the organization
api-version-string
1
Updates the role of an organization member.
Allows organization administrators to modify member permissions by
changing their assigned role within the organization.
Required permissions:
- Must be an organization owner
api-version-string
target-user-id
role
target-user-id
role
target-user-id
role
target-user-id
role
1
{
"target-user-id": "deb42ee7-3e2c-1386-2ef5-dca73a91114c",
"role": "anim eiusmod deserunt ipsum enim"
}
Removes a member from the organization
member-id
org-id
api-version-string
1
Adds a member to the organization
api-version-string
member-id
role
member-id
role
member-id
role
member-id
role
1
{
"member-id": "880ae701-3432-0dbe-3a58-e3903ce4f96a"
}
Fetches all members of the organization
organization-id
api-version-string
1
Invites a member to the organization
api-version-string
organization-id
origin
role
organization-id
origin
role
organization-id
origin
role
organization-id
origin
role
1
{
"email": "dolor pariatur tempor Lorem eiusmod",
"origin": "ut eiusmod"
}
Validates an invite code
api-version-string
code
code
code
code
1
{
"email": "dolore proident mollit",
"code": "sed voluptate minim velit dolore"
}
Retrieves all guardrail configurations for the organization.
api-version-string
1
Updates a guardrail configuration using the provided ID.
api-version-string
id
name
Name
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
active
Active
override
Active
examples
Examples
id
name
Name
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
active
Active
override
Active
examples
Examples
id
name
Name
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
active
Active
override
Active
examples
Examples
id
name
Name
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
active
Active
override
Active
examples
Examples
1
{
"id": "f4c5a984-2f5e-638b-d624-2ad50333e107",
"name": "Guardrail",
"description": "Guardrail description"
}
Creates a new guardrail configuration with the provided description, pass criteria, and fail criteria.
api-version-string
name
Name
active
Active
override
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
name
Name
active
Active
override
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
name
Name
active
Active
override
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
name
Name
active
Active
override
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
1
{
"name": "Guardrail",
"active": true,
"override": true,
"description": "Guardrail description",
"fail-criteria": "Guardrail fail criteria",
"examples": "nisi incididunt"
}
Checks guardrails for a given user and story.
api-version-string
story-id
Story ID
user-query
User query
skip-override
If true we will not check the override guardrails
story-id
Story ID
user-query
User query
skip-override
If true we will not check the override guardrails
story-id
Story ID
user-query
User query
skip-override
If true we will not check the override guardrails
story-id
Story ID
user-query
User query
skip-override
If true we will not check the override guardrails
1
{
"story-id": "00000000-0000-0000-0000-000000000000",
"user-query": "User query"
}
Fetch guardrails failures data
name
Name of the guardrail check
environment
Environment
limit
Max number
offset
Offset
api-version-string
1
Fetch the distinct names of the guardrails which have failures
api-version-string
1
Retrieves a guardrail configuration using the provided ID.
api-version-string
id
1
Deletes a guardrail configuration using the provided ID.
api-version-string
id
1
Generates embeddings for a JSON file. Provide the JSON file under the key data
and the file name under the key filename
. The response will include the ID of the embedding.
api-version-string
filename
data
s3-url
filename
data
s3-url
filename
data
s3-url
filename
data
s3-url
1
{
"filename": "elit cupidatat aliquip",
"data": {},
"s3-url": "labore sint esse nostrud"
}
Retrieves a user's information by their unique ID.
api-version-string
id
1
Deletes a user's profile by their unique ID.
api-version-string
id
1
Signs out the current user.
api-version-string
1
Retrieves a user's information by their session token.
api-version-string
token
token
token
token
1
{
"token": "qui Duis"
}
Returns the authentication token for the currently logged-in user.
api-version-string
1
Validates if the user has access to a resource using JWT token.
api-version-string
token
orgid
resource-type
token
orgid
resource-type
token
orgid
resource-type
token
orgid
resource-type
1
{
"token": "exercitation magna dolor commodo",
"orgid": "tempor",
"resource-type": "voluptate ex incididunt Excepteur adipisicing"
}
Validates if the user has admin privileges using JWT token.
api-version-string
token
token
token
token
1
{
"token": "in elit consequat"
}
Retrieves the details of the currently authenticated user.
api-version-string
1
Retrieves the details of the currently authenticated user.
api-version-string
1
Authenticates the current user using an authorization code.
api-version-string
referred-by
code
referred-by
code
referred-by
code
referred-by
code
1
{
"referred-by": "fugiat",
"code": "nisi qui"
}
Saves user feedback and grants credits to the user's account in exchange. This feedback can help improve the story or system performance.
api-version-string
user-id
User ID
feedback
User feedback
user-id
User ID
feedback
User feedback
user-id
User ID
feedback
User feedback
user-id
User ID
feedback
User feedback
1
{
"user-id": "00000000-0000-0000-0000-000000000000",
"feedback": {}
}
Checks whether the author has already rated their story with a thumbs up or thumbs down.
story-id
api-version-string
1
Saves a thumbs up or down rating for a story, indicating whether the author liked or disliked it.
api-version-string
story-id
Story ID
liked
User liked the story
story-id
Story ID
liked
User liked the story
story-id
Story ID
liked
User liked the story
story-id
Story ID
liked
User liked the story
1
{
"story-id": "00000000-0000-0000-0000-000000000000",
"liked": false
}
Retrieves the list of available story plan schemas that define customizable options, such as length, tone, and audience, for story creation.
api-version-string
1
Uses an AI model to generate a suggested title and description based on provided settings, including audience, creativity level, and reading level.
api-version-string
audience
creativity
custom-instructions
length
output-language
personality
reading-level
report-type
title-style
audience
creativity
custom-instructions
length
output-language
personality
reading-level
report-type
title-style
audience
creativity
custom-instructions
length
output-language
personality
reading-level
report-type
title-style
audience
creativity
custom-instructions
length
output-language
personality
reading-level
report-type
title-style
1
{
"length": "reprehenderit Excepteur",
"output-language": "fugiat",
"reading-level": "sint eu qui"
}
Fetches the default story configuration set by the user for streamlined story creation.
api-version-string
1
Allows the user to set a specific story configuration as the default for future story creation.
api-version-string
id
id
id
id
1
{
"id": "a2a08688-7e47-cb3a-386f-4fc7bde1a9d8"
}
Creates a new story configuration or updates an existing one, using the provided configuration name to identify it.
api-version-string
id
description
config-name
config-display-name
storyplan
id
description
config-name
config-display-name
storyplan
id
description
config-name
config-display-name
storyplan
id
description
config-name
config-display-name
storyplan
1
{
"id": "46322cef-83b3-5039-c71d-e2c3ce4fab03"
}
1
1
api-version-string
1
search-value
limit
sort-by
descending
api-version-string
1
api-version-string
arn
query
arn
query
arn
query
arn
query
1
{
"arn": "ut mollit ea aute adipisicing",
"query": "reprehenderit Excepteur tempor cillum"
}
Fetches a curated list of prompts generated by our LLM to display on the homepage. These prompts provide users with suggestions and ideas to help them get started.
api-version-string
1
Fetches a list of all API example prompts.
api-version-string
1
Fetches a list of all API prompts.
api-version-string
1
Generates the OAuth URI to begin the authentication process with Twitter, allowing users to authorize the app.
api-version-string
1
Processes the callback from Twitter OAuth after the user has authorized the app. Requires the OAuth token and verifier to complete the authentication.
api-version-string
oauth-token
oauth-verifier
oauth-token
oauth-verifier
oauth-token
oauth-verifier
oauth-token
oauth-verifier
1
{
"oauth-token": "quis cillum et sit",
"oauth-verifier": "reprehenderit dolore in mollit"
}
Publishes a tweet containing media, such as images. Requires tweet text and media content for successful posting.
api-version-string
text
media
text
media
text
media
text
media
1
{
"text": "proident ex occaecat id nisi",
"media": {}
}
Retrieves all changelogs
api-version-string
1
Updates a changelog using the provided ID.
api-version-string
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
1
{
"id": "00000000-0000-0000-0000-000000000000",
"release-version": "0.0.0",
"cg-status": "active",
"release-notes": []
}
Deletes a changelog using the provided ID.
id
Changelog ID
api-version-string
1
Creates a new changelog with the provided release version, CG status, and release notes.
api-version-string
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
id
Changelog ID
release-version
Release Version
cg-status
CG Status
release-notes
Release Notes
1
{
"id": "00000000-0000-0000-0000-000000000000",
"release-version": "0.0.0",
"cg-status": "active",
"release-notes": []
}
Fetches all notifications for a user that are not marked as hidden, identified by the user-id. Notifications include updates, interactions, and other relevant alerts.
user-id
api-version-string
1
Marks a notification as hidden, making it invisible to the user without permanently deleting it from the database. Identified by notification ID.
id
api-version-string
1
Creates a new notification for a user, associating it with an optional story ID or liker user ID. Allows specifying timestamps and custom messages.
api-version-string
id
user-id
story-id
message
liker-user-id
created-at
updated-at
id
user-id
story-id
message
liker-user-id
created-at
updated-at
id
user-id
story-id
message
liker-user-id
created-at
updated-at
id
user-id
story-id
message
liker-user-id
created-at
updated-at
1
{
"id": "19141e89-d26d-6d9f-5726-993108165524",
"user-id": "37cfa73e-d4d6-372a-cbfd-406ae61e796a",
"story-id": "7e3ee255-9fdd-ef93-051a-80f2548c9620",
"message": "in in",
"liker-user-id": null,
"created-at": "1932-11-25T15:47:13.0Z",
"updated-at": "1896-04-03T01:26:15.0Z"
}
Adds credits to the specified user account by validating and applying a promo code.
api-version-string
promo-code
Promo code
promo-code
Promo code
promo-code
Promo code
promo-code
Promo code
1
{
"promo-code": "PROMO123"
}
Manually credits the user's account based on provided user ID and credit amount. Additional notes can be included for record-keeping.
api-version-string
user-id
User ID
credits
Credits
notes
Notes
user-id
User ID
credits
Credits
notes
Notes
user-id
User ID
credits
Credits
notes
Notes
user-id
User ID
credits
Credits
notes
Notes
1
{
"user-id": "00000000-0000-0000-0000-000000000000",
"credits": 100,
"notes": "Credits added for testing"
}