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 |
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": "461c0902-ad5b-0f32-faf8-e14596136459",
"pdf-sources": [
"esse Lorem nulla mollit"
],
"image-sources": [
"cillum",
null,
"incididunt fugiat minim occaecat"
],
"url-sources": [
"qui nulla nisi anim exercitation",
"qui culpa occaecat",
"sunt labore ut id velit"
],
"project-name": "Duis ex dolor id Ut"
}
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": [
null,
"labore cupidatat occaecat aliqua",
null
],
"image-sources": [
"dolor",
"eu enim pariatur proident"
],
"url-sources": [
"quis nulla",
null,
null,
"non enim nulla",
null
]
}
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.
project-id
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
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": "5aa86aa1-38ac-e0bc-56e5-135b249a60dc",
"draft-depth": 86751985,
"events": [
{
"event-id": "54dca7d7-329f-ec8c-5ddb-9e5bb820af50",
"block-id": "0555608c-d34c-6770-09f9-49ab04c2112b",
"content": {}
},
{
"event-id": "9f92ac65-c916-c66e-bf24-caaa0dd0005c",
"block-id": "7da4cf02-d906-ae41-7686-1888d522e54c",
"content": {}
},
{
"event-id": "07a6c0f7-d76a-92d6-9e58-60bed68c1a87",
"block-id": "9cf89964-dc10-adcb-f87e-ccc4ea6d4d52",
"content": {}
}
]
}
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": "ebd9eb64-d188-a31e-cd0e-0bca5d237f47",
"draft-id": "8e971c7a-c9af-b621-5a7f-faddea91fe85",
"event-id": "ace8ca3c-7651-909b-f26f-5e7207b76457",
"block-id": "ab643aa3-618f-d321-e1a9-e616170d2da9",
"output-sub-type": "nostrud",
"output-type": "mollit irure velit dolore sunt",
"event-id-below": "c94ffa49-8cf1-f488-5cd9-e0167aae9d31"
}
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": "occaecat sed laborum",
"code": "nulla in"
}
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": "13acc852-c4b0-df63-d233-aabad51a7551"
}
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
data
source-url
source-id
filename
generate-embedding
data
source-url
source-id
filename
generate-embedding
data
source-url
source-id
filename
generate-embedding
data
source-url
1
{
"source-id": "c57ddc0b-f17d-030d-3283-4116ae897bb2",
"filename": "eiusmod"
}
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
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": "exercitation ullamco Duis quis ut"
}
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": "3462429d-9fe0-ee41-658e-044925d6a007",
"active-draft-id": "352db83b-a6f6-4f33-62f7-e893a67a9a04"
},
"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": "296ab4e4-4b2a-cd0a-d6a0-0633552a7f8c",
"version": "elit fugiat",
"headline": {},
"authors": {},
"chapters": [
{
"id": "9cb450ff-a45b-a763-7d37-cd07b9ad0a8e",
"block-type": "chapter",
"sections": [
{
"block-type": "section",
"id": "e25a779a-2914-9672-6591-4f3583d85837",
"title": {},
"intro": {},
"palette": "et pariatur minim in eu",
"show-headings": true,
"is-collpased": false,
"subsections": [
{
"block-type": "subsection",
"id": "576186fa-6fd7-8c9e-2d4f-7773f14ff703",
"row": "2",
"column": "1",
"blocks": [
{
"block-type": "metrics",
"id": "3788c2f8-9684-0d2e-7616-c65c93330733",
"metrics": [
{
"data": 65320901.178783774,
"descriptor": null,
"icon": {
"source": "aute"
}
},
{
"data": -71648657.52655265,
"descriptor": "ullamco",
"icon": {
"source": "proident culpa reprehenderit cupidatat laboris"
}
}
],
"source-ids": [
"commodo incididunt dolor dolore Excepteur"
],
"llm-selection": true,
"event-id": "ipsum sint ex",
"event-block-index": -94401707.00581576
},
{
"block-type": "table",
"id": "51dbb44b-52f6-8916-dbda-11ad04d8119b",
"event-id": "culpa adipisicing",
"data": []
},
{
"block-type": "metrics",
"id": "25b1efa3-655f-723c-5552-c3d1f24248a5",
"metrics": [
{
"data": 6807276.710183442,
"descriptor": "ex magna dolore",
"icon": {
"source": "nulla ut",
"url": "irure enim esse tempor ex"
}
},
{
"data": -86509999.75181884,
"descriptor": null,
"icon": {
"source": "ex"
}
}
],
"source-ids": [
"laborum"
],
"llm-selection": false,
"event-id": "in esse",
"event-block-index": 86621701.87617376
},
{
"block-type": "text",
"id": "c5e0af6a-e0a4-a391-d47b-94ed43b26009",
"variant": "do fugiat exercitation",
"source-ids": [
"in ex exercitation",
"velit sit ut"
],
"bans": [
{
"data": -96312916.5439836,
"descriptor": "officia sit consectetur",
"icon": {
"source": "Lorem",
"url": "tempor aute est sint"
}
},
{
"data": "velit eiusmod dolore",
"descriptor": "laborum non dolore",
"icon": {
"source": "ut dolor id"
}
}
],
"event-id": "reprehenderit Lorem",
"event-block-index": 97694613.15815243,
"is-new": true
}
]
},
{
"block-type": "subsection",
"id": "39d10901-8b4d-12c1-e947-769b02c24ba9",
"row": "1",
"column": "1",
"blocks": [
{
"block-type": "image",
"id": "6f7d8ed2-fcaa-fdca-4676-db22997912eb",
"src": "veniam officia aute irure laboris",
"width": -75977803,
"height": 85216791,
"caption": "cupidatat dolor deserunt sit",
"llm-selection": true,
"show-caption": false,
"source-ids": [
"nisi sed elit eiusmod dolore"
],
"event-block-index": 76895709.57679597,
"image-style": null,
"error-code": null
},
{
"block-type": "quote",
"id": "177b6881-e9a6-5802-fbfe-1b18c0d3372d",
"quote": "labore dolor",
"source-ids": [],
"event-id": "ut quis",
"event-block-index": -37269697.699021
},
{
"block-type": "table",
"id": "5d987311-e975-ff2c-143e-3029c48093e3",
"event-id": "cupidatat ad mollit anim",
"event-block-index": -71348546.55319196,
"data": []
},
{
"block-type": "ai_generated_chart",
"id": "066c7738-3673-28ae-653d-1ef2af36f931",
"event-id": "nulla ex",
"url": "dolore sint mollit deserunt",
"event-block-index": 8599172.807103723,
"llm-selection": true,
"source-ids": [
"elit",
"deserunt et aute elit dolor",
"do ipsum aute"
]
}
]
}
],
"created-at": "sint dolore qui exercitation",
"remix-suggestions": [
"consectetur mollit velit"
],
"topics": [
"et dolor aliqua labore eiusmod",
"adipisicing non dolore pariatur laboris",
"proident ut aliquip",
"ex cupidatat ut mollit"
]
}
]
}
]
}
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": "ba8f88e0-6121-e0a0-7483-7751dbcaa78a"
}
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": "19922fd1-004a-93e1-73b8-f191b0c31ae5",
"draft-id": "18395cad-4607-7964-a1fa-9eea1ac4fae9",
"error-type": "voluptate aute ea aliquip dolor",
"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": "3c42da85-5223-8590-5fe2-5e200b404d7e"
}
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": "b2186988-9e5b-a728-db8e-8f476ca8e685"
}
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 segments of AI-generated content. The request body may include a 'story plan'—an object containing customization instructions such as length, model selection, use of images or charts, and more. You must provide either a story plan or a story plan ID
api-version-string
story-id
user-config-params
story-plan-config-id
source-ids
story-id
user-config-params
story-plan-config-id
source-ids
story-id
user-config-params
story-plan-config-id
source-ids
story-id
user-config-params
story-plan-config-id
source-ids
1
{
"story-id": "b5dc8213-7897-9443-0eff-524d8875772b"
}
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",
"user-chat-params": {},
"cyoa": false
}
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": "16ccefcc-4bdb-1f6d-cbb5-367aec57e22c",
"draft-id": "0007c6bc-7c52-2194-e960-4171af9ff1ac",
"block-id": "e471b778-5c51-5bfb-6187-6badb7df15a0"
}
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": "in cillum",
"block-type": "aute Excepteur",
"new-block": true,
"local-context": [],
"story-id": "643a9a24-bd8d-b4fd-4d7f-0314fd5c5dce",
"event-id": "d70b4a40-b9d2-dd5f-3d77-b84a18daa4d4"
}
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": "1bd50ca9-4f1b-b6f6-f375-c2064d25d59c"
}
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": "e1afc49f-4432-aa5a-dd96-818fa5cc98f8",
"ws-uuid": "2da47caa-3dfb-9906-e113-8a0e5eb253d4"
}
Fetches a preview link for a chart generated by Tako, an external chart generation service. This link provides a visual preview of the requested chart based on the specified parameters.
pub-id
api-version-string
1
Fetches a preview link for a chart generated by Tako using version 2 of the API. This was created as a POC of capitol versioning.
pub-id
silly-key
api-version-string
1
Sends the user’s authorization code to Google Drive to establish access. This step is required to enable exporting stories to Google Drive.
api-version-string
user-id
code
user-id
code
user-id
code
user-id
code
1
{
"user-id": "73a32298-7033-7f9d-2855-ae5b0e0009ee",
"code": "cillum"
}
Fetches a list of Google Drive accounts that the user has authorized, allowing verification of linked accounts.
api-version-string
1
Deletes all Google Drive account authorizations for the user, revoking access for exporting stories.
api-version-string
1
Takes a story ID and exports the corresponding story to the user’s Google Drive account. Requires prior authorization from the user to access Google Drive.
api-version-string
story-id
draft-id
story-id
draft-id
story-id
draft-id
story-id
draft-id
1
{
"story-id": "4e203d4e-2d55-8478-52c8-cc9741658921",
"draft-id": "5cd8b02c-9f5a-c877-d4e5-33a4493bd13c"
}
get api keys for org
api-version-string
1
sets an api for organization
api-version-string
key
value
key
value
key
value
key
value
1
{
"key": "reprehenderit dolore consectetur et ad",
"value": "labore aliquip enim Lorem non"
}
Fetches the details of the current organization
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
{
"name": "nisi culpa est in"
}
Creates a new organization for the user
api-version-string
name
image-url
name
image-url
name
image-url
name
image-url
1
{
"name": "nisi culpa qui",
"image-url": "dolore"
}
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": "c7cbf999-4999-a94d-e68c-9f0695252e80",
"name": "amet ex",
"domain": "tempor est adipisicing occaecat culpa"
}
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": "voluptate adipisicing",
"domain": "non adipisicing culpa Lorem aliquip"
}
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": "9df61691-35ee-b6df-051c-a33131c2b2d2",
"primary-model": "voluptate consectetur pariatur dolor",
"secondary-model": "nostrud enim consequat Excepteur eu"
}
Fetches all models for the organization
api-version-string
1
Fetches all members of the organization
api-version-string
1
Removes a member from the organization
member-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": "0fc1da0c-3b3a-d82c-f976-8c903b131d09",
"role": "fugiat voluptate amet deserunt"
}
Fetches all members of the organization
organization-id
api-version-string
1
Invites a member to the organization
api-version-string
organization-id
role
organization-id
role
organization-id
role
organization-id
role
1
{
"organization-id": "b49ae95e-2ccc-eb25-f290-70060c958b50",
"email": "sit dolor"
}
Validates an invite code
api-version-string
code
code
code
code
1
{
"email": "sit ipsum enim",
"code": "laboris"
}
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
examples
Examples
id
name
Name
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
active
Active
examples
Examples
id
name
Name
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
active
Active
examples
Examples
id
name
Name
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
active
Active
examples
Examples
1
{
"id": "ecc32c5b-cb9d-ad91-81b1-c403034dd7a7",
"name": "Guardrail",
"description": "Guardrail description",
"pass-criteria": "Guardrail pass criteria",
"fail-criteria": "Guardrail fail criteria",
"active": true,
"examples": "Guardrail examples"
}
Creates a new guardrail configuration with the provided description, pass criteria, and fail criteria.
api-version-string
name
Name
active
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
name
Name
active
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
name
Name
active
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
name
Name
active
Active
description
Description
pass-criteria
Pass criteria
fail-criteria
Fail criteria
examples
1
{
"name": "Guardrail",
"active": true,
"examples": "est aliquip occaecat adipisicing"
}
Checks guardrails for a given user and story.
api-version-string
story-id
Story ID
user-query
User query
story-id
Story ID
user-query
User query
story-id
Story ID
user-query
User query
story-id
Story ID
user-query
User query
1
{
"story-id": "00000000-0000-0000-0000-000000000000"
}
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": "cillum exercitation aliqua ut",
"data": {},
"s3-url": "nulla incididunt id dolore est"
}
Updates the authenticated user's data in the database.
api-version-string
id
username
first-name
last-name
type
is-active
image
email-verified
hide-first-time-signin-modal
hide-disclaimer-banner
hide-home-page-onboarding
hide-story-page-onboarding
hide-photomaker-modal
last-feedback-timestamp
use-case
use-case-details
topics-of-interest
onboarding-flow-completed
has-selected-membership
id
username
first-name
last-name
type
is-active
image
email-verified
hide-first-time-signin-modal
hide-disclaimer-banner
hide-home-page-onboarding
hide-story-page-onboarding
hide-photomaker-modal
last-feedback-timestamp
use-case
use-case-details
topics-of-interest
onboarding-flow-completed
has-selected-membership
id
username
first-name
last-name
type
is-active
image
email-verified
hide-first-time-signin-modal
hide-disclaimer-banner
hide-home-page-onboarding
hide-story-page-onboarding
hide-photomaker-modal
last-feedback-timestamp
use-case
use-case-details
topics-of-interest
onboarding-flow-completed
has-selected-membership
id
username
first-name
last-name
type
is-active
image
email-verified
hide-first-time-signin-modal
hide-disclaimer-banner
hide-home-page-onboarding
hide-story-page-onboarding
hide-photomaker-modal
last-feedback-timestamp
use-case
use-case-details
topics-of-interest
onboarding-flow-completed
has-selected-membership
1
{
"id": "186a746e-f240-4040-3dbb-2776f038db9c",
"username": null,
"is-active": false,
"hide-story-page-onboarding": true,
"has-selected-membership": null
}
Searches for users based on a query string.
query
api-version-string
1
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
Checks if a username can be saved in the database.
username
api-version-string
1
Allows the user to upload a profile photo.
api-version-string
Unnamed Property
Unnamed Property
Unnamed Property
Unnamed Property
1
{}
Saves the user's settings.
api-version-string
default-publicity
hide-first-time-signin-modal
hide-home-page-onboarding
hide-disclaimer-banner
hide-photomaker-modal
onboarding-flow-completed
hide-story-page-onboarding
has-selected-membership
mailing-list
default-publicity
hide-first-time-signin-modal
hide-home-page-onboarding
hide-disclaimer-banner
hide-photomaker-modal
onboarding-flow-completed
hide-story-page-onboarding
has-selected-membership
mailing-list
default-publicity
hide-first-time-signin-modal
hide-home-page-onboarding
hide-disclaimer-banner
hide-photomaker-modal
onboarding-flow-completed
hide-story-page-onboarding
has-selected-membership
mailing-list
default-publicity
hide-first-time-signin-modal
hide-home-page-onboarding
hide-disclaimer-banner
hide-photomaker-modal
onboarding-flow-completed
hide-story-page-onboarding
has-selected-membership
mailing-list
1
{
"default-publicity": false
}
Signs out the current user.
api-version-string
1
Fetches the QR code for the authenticated user.
api-version-string
1
Retrieves the details of the currently authenticated user.
api-version-string
1
Handles webhook notifications from Stripe, triggered when a user completes a plan purchase or an event occurs within Stripe. Processes updates to user memberships accordingly.
api-version-string
1
Fetches the user's current membership details, including whether they have a free plan or a paid pro plan.
api-version-string
1
Provides a list of all memberships associated with the user, including current and any historical memberships.
api-version-string
1
Returns the list of membership plans currently available for purchase, as configured within Stripe.
api-version-string
1
Called by Stripe upon successful plan purchase, finalizing the membership update for the user in the system.
api-version-string
1
Generates a new session to initiate the plan purchase process via Stripe.
api-version-string
1
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
}
Fetches a list of all story configurations saved by the user. These configurations determine settings such as length and style for story creation.
api-version-string
1
Updates an existing user story configuration by ID, with options to modify the configuration name, display name, and storyplan details.
api-version-string
id
config-name
config-display-name
storyplan
id
config-name
config-display-name
storyplan
id
config-name
config-display-name
storyplan
id
config-name
config-display-name
storyplan
1
{
"id": "e6f39fbc-cff6-929b-638f-8c7df66c9600",
"config-name": "fugiat dolore et pariatur nostrud",
"config-display-name": "commodo nostrud",
"storyplan": {}
}
Removes a story configuration from the user's account, identified by configuration ID.
id
api-version-string
1
Generates a new story configuration with optional fields such as description, configuration name, and display name. The storyplan structure allows custom settings for the story.
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": "8174e82a-bef8-7e1e-f5ea-1963b0081f52",
"description": "fugiat",
"config-name": "laborum cillum in qui",
"config-display-name": "in dolor irure commodo laboris",
"storyplan": {}
}
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
{
"audience": "occaecat dolor et elit Ut",
"creativity": "elit aliquip",
"custom-instructions": "ex Lorem ea",
"length": "in",
"output-language": "ad enim magna",
"personality": "Lorem culpa eu",
"reading-level": "esse aliqua ea",
"report-type": "Lorem"
}
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": "fab6466c-7924-aabf-f1ef-7b1186e408b3"
}
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": "161cc837-8212-1a73-4458-9624db1cf2b7",
"config-name": "laboris ea ex",
"storyplan": {}
}
1
1
api-version-string
1
search-value
limit
sort-by
descending
api-version-string
1
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
Creates a new example prompt for API use.
api-version-string
prompt
prompt
prompt
prompt
1
{
"prompt": "labore est ullamco enim dolore"
}
Deletes a specific API example prompt by ID.
api-version-string
id
1
regenerate prompts
api-version-string
1
Fetches a list of all API prompts.
api-version-string
1
Creates a new API prompt.
api-version-string
prompt
longPrompt
prompt
longPrompt
prompt
longPrompt
prompt
longPrompt
1
{
"prompt": "est velit"
}
Deletes a specific API prompt by ID.
api-version-string
id
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": "consequat eu occaecat qui",
"oauth-verifier": "incididunt"
}
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": "voluptate est nostrud reprehenderit",
"media": {}
}
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": "fc2e4bfd-2236-c970-19a6-9e1ad9d77dfc",
"user-id": "0c118aed-2385-33a1-5468-31ff7dc04070",
"story-id": "2a7d16f1-f291-7e7c-7171-6058c018328d",
"message": "dolore quis",
"liker-user-id": null,
"created-at": "1904-02-15T02:50:43.0Z",
"updated-at": "1917-02-16T01:43:42.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"
}