logo
Index
API Reference
Authentication
Agentic Search Apps
List agentic search apps
Create new agentic search app
Get agentic search app by ID
Update agentic search app
Delete agentic search app
Download agentic search app as JSON
Upload logo for agentic search app
Get logo URL for agentic search app
Audit Trail
Get audit history for an organization
Get complete history for a specific record
Get activity history for a specific user
Get available tables for audit filtering
Get available actions for audit filtering
auth
Sign out
Get user by token
Get current user's authentication token
Authorize user access to a resource
Authorize user admin access
Authentication
Validate authentication token
Check authentication token
capitol events
Fetch capitol events
Update a capitol event
Delete a capitol event
Create a new capitol event
Perform a bulk update operation
Re order the capitol events
Turn a event of a image into a test.
Retrieve Capitol events for a specific document
Delete a specific Capitol event
Execute a bulk update of events within a document draft
Transform an event block into a different block type
capitol projects
Delete a document from project
Retrieve a Capitol project by user
Update a Capitol project
Delete a Capitol project
Create a new Capitol project
List all Capitol projects for a user
List all Capitol documents within a project
Retrieve Capitol documents within a specific project
Move a document between projects
Remove a document from a project
Retrieve sources within a project
Copy a source to another project
Delete a source from a project
Changelog
Get All Changelogs
Create Changelog
Get Changelogs By Service
Get Changelog
Update Changelog
Delete Changelog
Client API Keys
Get Api Key
Delete Client Api Key
Get Client Api Keys
Create Client Api Key
current-org
Retrieve current org
current-user
Retrieve current user
Authenticate current user with auth code
default
Retrieve user default story configurations
embeddings
Generate embeddings for json
Evaluations
Auto Generate Binary Eval Config
Auto Generate Score Eval Config
List Tests
Get Test
Update Test Config
Delete Test
Create Test
Run Test
List Test Runs
Get Test Run
List Evaluations
Create Evaluation
Get Evaluation
Update Evaluation
Delete Evaluation
feed
Fetch a list of stories. Based on the search params and in the filters.
feedback
Submit user feedback and receive credits
Verify if the story has been rated by its author
Record thumbs up/down feedback for a story
Format Settings
List Format Settings
Delete Format Settings
Create Format Settings
Get Format Settings
Update Format Settings
Generation Dashboards
Get Generation Metrics
Get Generations
guardrails
Get all guardrail config by org
Update a specific guardrail config
Create a new guardrail config
Check prompt against the guardrails checks.
Fetch guardrails failures data
Fetch the distinct names of the guardrails which have failures
Get a specific guardrail config
Delete a specific guardrail config
Guardrails
Get Guardrails
Get Guardrail
Patch Guardrail
Delete Guardrail
Create Guardrail Config From Description
Put Guardrail
Get Guardrails Failures
Get Distinct Guardrails Failures Names
Check Guardrails Prompt
integration
Fake search
Fake upload sources
Internal API Keys
Get Organization Api Keys
Create Internal Api Key
Delete Internal Api Key
Internal API Keys Admin
Get All Organizations Api Keys
llm-chat
Request prompt suggestions for Block level chat
Retrieve chat history for a story or component
Submit a user message and receive an agent’s response
Reset chat history for a specific block
Request prompt suggestions for a content block
Request prompt suggestions for a content block
Request prompt suggestions for a completed draft
Stop the ongoing story generation
llm-socket
Request chat_id and socket_address
Initiate document generation and obtain streaming address
Machine-to-Machine Only
List Dynamodb Schemas
List All Scheduled Pipelines
Lookup Api Key By Value
Organization Dedicated Qdrant Clusters
List Org Qdrant Clusters
Create Org Qdrant Cluster
Get Org Qdrant Cluster
Update Org Qdrant Cluster
Delete Org Qdrant Cluster
Organization Members
Get Organization Members
Create Org Member
Update Org Member
Delete Org Member
Accept Org Member
Accept Org Member
Get Members By Email
Organization Members Admin
Get All Organization Invites
Organization Prompts
Get All Org Prompts
Create Org Prompt
Get Single Org Prompt
Update Org Prompt
Delete Org Prompt
Regenerate Org Prompts
organizations
Fetch the details of the current organization
Update the details of an organization
Delete an organization (QA environments only)
Create a new organization
Fetch all organizations
Upload a logo
Fetch all api keys for the organization
Update the name of an api key
Delete an api key by id
Create a new api key for the organization
Fetch all models for the organization
Upsert the primary and seconday model for an organization
Fetch all models available for the organization
Fetch all members of the organization
Update organization member role
Remove a member from the organization
Add a member to the organization
Fetch all members of the organization
Invite a member to the organization
Validate an invite code
Organizations
Get Current User Organizations
Get Organization
Update Organization
Delete Organization
Upload Organization Logo
Organizations Admin
Get All Organizations
Create a new organization
Pipeline Basic Settings
List Pipeline Basic Settings
Create Pipeline Basic Settings
Get Pipeline Basic Settings
Update Pipeline Basic Settings
Delete Pipeline Basic Settings
Pipeline Blocks Settings
List Pipeline Blocks Settings
Create Pipeline Blocks Settings
Get Pipeline Blocks Settings
Update Pipeline Blocks Settings
Delete Pipeline Blocks Settings
Pipeline Data Settings
List pipeline data settings
Create new pipeline data settings
Get pipeline data settings by ID
Update pipeline data settings
Delete pipeline data settings
Pipeline Layout Settings
List Layouts
Create Layout
Get Layout
Update Layout
Delete Layout
Pipeline Settings
List Pipeline Settings
Delete Pipeline Settings
Create Pipeline Settings
Get Pipeline Settings
Update Pipeline Settings
Clojure Async
prompts
Get homepage prompts
sources
It creates a WS adress for processing user's pdfs and urls.
Process the user sources.
Retrieve sources by story id
Create a WebSocket address for PDF and URL processing
Upload and process user sources asynchronously
Process JSON or URL user sources
Process files user's sources synchronously
Retrieve sources by story ID
Validate YouTube link
Retrieve data by organization ID
Fetch distinct values by key name
Export source metrics to CSV
Export source metrics to JSON file
Sources
Get Source Metrics
Get Distinct Values
Export Metrics Endpoint
stories
Fetch a particular story
Update a story in the DB
Delete a story from the DB
Commit a new story to the DB
Fetch mini info of a particular story
Fetch a particular story
Patch the story visibility.
Fork a story
Retrieve a specific story
Update an existing story
Delete a story
Save a new story
Fetch story events
Fork an existing story
Retry a failing story/block
Fetch minimal story information
Toggle story visibility
story-edit
Duplicate a block in a story.
story-remix
Remix a complete story.
Remix a complete story
storyplan-config
Fetch available story plan schemas
Generate title and description with AI
Retrieve user's default story configurations
Set a default story configuration for the user
Create or update a story configuration by name
Uploads
Get Upload Policy
List Collections
Create Collection
List Collection Files
Delete Collection
Upload Files
Delete File
user
Get user by ID
Delete user by ID
User Authentication
Create a new user account
Authenticate user and get access token
User Profile
Get current user profile
Utilities
Health Check
App Version
Ping Sentry
Utility
Report the latest API version.
home
GET: /info
Report the latest API version
Search for stories and users that match a specific value. Stories are searched on headline + lead-in. Sort-by, limit, and descending are all optional (default: limit 30, most recent first).
POST: /api/v1/invoke-step-function
Retrieve generated prompts for the homepage
Get all API example prompts
Get all API prompts
Initiate Twitter OAuth authentication
Handle Twitter OAuth callback
Post a tweet with media
Get all changelogs
Update a specific changelog
Delete a specific changelog
Create a new changelog
Retrieve all visible notifications for a user
Soft delete a notification
Create a new notification
Apply credits to a user's account with a promo code
Directly add credits to a user's account
powered by zuplo
Sign in

Capitol AI Services API

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.
BASE URL
https://api.capitol.ai

Authentication

Sign into view and manage your API credentials

prompts

ENDPOINTS
GET/prompts

capitol projects

ENDPOINTS
DELETE/project/docs
GET/api/v1/project
PUT/api/v1/project
DELETE/api/v1/project
POST/api/v1/project
GET/api/v1/project/list
GET/api/v1/project/docs/list
GET/api/v1/project/docs
PUT/api/v1/project/docs
DELETE/api/v1/project/docs
GET/api/v1/project/source
PUT/api/v1/project/source
DELETE/api/v1/project/source

capitol events

ENDPOINTS
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

sources

ENDPOINTS
POST/user/sources/ws
POST/user/sources/upload-source
GET/user/sources/story
POST/api/v1/user/sources/ws
POST/api/v1/user/sources/upload-source
POST/api/v1/user/sources/upload-source/sync
POST/api/v1/user/sources/upload-source/file
GET/api/v1/user/sources/story
POST/api/v1/user/sources/youtube
GET/api/v1/user/sources/data
GET/api/v1/user/sources/data/values
POST/api/v1/user/sources/data/csv
POST/api/v1/user/sources/data/json

default

ENDPOINTS
GET/user/storyplan-config/default

stories

ENDPOINTS
GET/stories/story
PUT/stories/story
DELETE/stories/story
POST/stories/story
GET/stories/mini
GET/stories/story/events
PATCH/stories/visibility
POST/stories/fork
GET/api/v1/stories/story
PUT/api/v1/stories/story
DELETE/api/v1/stories/story
POST/api/v1/stories/story
GET/api/v1/stories/story/events
POST/api/v1/stories/story/fork
POST/api/v1/stories/story/retry
GET/api/v1/stories/mini
PATCH/api/v1/stories/visibility

story-edit

ENDPOINTS
POST/stories/fork-block

story-remix

ENDPOINTS
POST/stories/remix/story
POST/api/v1/stories/remix/story

feed

ENDPOINTS
GET/stories/feed

llm-socket

ENDPOINTS
POST/chat/async
POST/api/v1/chat/async

llm-chat

ENDPOINTS
POST/chat/block-suggestions
GET/api/v1/chat
POST/api/v1/chat
POST/api/v1/chat/reset-block-chat
POST/api/v1/chat/block-suggestions
POST/api/v1/chat/suggestions/block
POST/api/v1/chat/suggestions/draft
POST/api/v1/chat/cancel

Machine-to-Machine Only

ENDPOINTS
GET/dynamodb-schemas
GET/scheduled-pipelines
GET/internal-api-keys/lookup

Utilities

ENDPOINTS
GET/health
GET/version
GET/ping-sentry

Authentication

ENDPOINTS
POST/auth/validate
POST/auth/check

Organization Dedicated Qdrant Clusters

ENDPOINTS
GET/qdrant-clusters/:orgid
POST/qdrant-clusters/:orgid
GET/qdrant-clusters/:orgid/:cluster_id
PATCH/qdrant-clusters/:orgid/:cluster_id
DELETE/qdrant-clusters/:orgid/:cluster_id

Changelog

ENDPOINTS
GET/changelog
POST/changelog
GET/changelog/service-name/:service_name
GET/changelog/by-id/:changelog_id
PATCH/changelog/:changelog_id
DELETE/changelog/:changelog_id

Client API Keys

ENDPOINTS
GET/client-api-keys/:orgid/:id
DELETE/client-api-keys/:orgid/:id
GET/client-api-keys/:orgid
POST/client-api-keys/:orgid

Guardrails

ENDPOINTS
GET/guardrails/:orgid/all
GET/guardrails/:orgid/:guardrail_id
PATCH/guardrails/:orgid/:guardrail_id
DELETE/guardrails/:orgid/:guardrail_id
POST/guardrails/create-guardrail-config-from-description
POST/guardrails/:orgid
GET/guardrails/:orgid/failures
GET/guardrails/:orgid/failures/names
POST/guardrails/:orgid/check/prompt

Internal API Keys Admin

ENDPOINTS
GET/internal-api-keys

Internal API Keys

ENDPOINTS
GET/internal-api-keys/:orgid
POST/internal-api-keys/:orgid
DELETE/internal-api-keys/:orgid/:id

Organizations Admin

ENDPOINTS
GET/organizations
POST/organizations

Organizations

ENDPOINTS
GET/organizations/me
GET/organizations/:orgid
PUT/organizations/:orgid
DELETE/organizations/:orgid
POST/organizations/:orgid/logo

Organization Members Admin

ENDPOINTS
GET/org-members/invites

Organization Members

ENDPOINTS
GET/org-members/:orgid/invites
POST/org-members/:orgid/invites
PATCH/org-members/:orgid/invites/:invite_id
DELETE/org-members/:orgid/invites/:invite_id
GET/org-members/:orgid/invites/:invite_id/accept
POST/org-members/:orgid/invites/:invite_id/accept
GET/org-members/invites/email/:email

Organization Prompts

ENDPOINTS
GET/org-prompts/:orgid
POST/org-prompts/:orgid
GET/org-prompts/:orgid/:prompt_id
PUT/org-prompts/:orgid/:prompt_id
DELETE/org-prompts/:orgid/:prompt_id
POST/org-prompts/:orgid/regenerate

Pipeline Basic Settings

ENDPOINTS
GET/pipeline-basic-settings/:orgid
POST/pipeline-basic-settings/:orgid
GET/pipeline-basic-settings/:orgid/:id
PUT/pipeline-basic-settings/:orgid/:id
DELETE/pipeline-basic-settings/:orgid/:id

Pipeline Blocks Settings

ENDPOINTS
GET/pipeline-blocks-settings/:orgid
POST/pipeline-blocks-settings/:orgid
GET/pipeline-blocks-settings/:orgid/:id
PUT/pipeline-blocks-settings/:orgid/:id
DELETE/pipeline-blocks-settings/:orgid/:id

Pipeline Data Settings

ENDPOINTS
GET/pipeline-data-settings/:orgid
POST/pipeline-data-settings/:orgid
GET/pipeline-data-settings/:orgid/:id
PATCH/pipeline-data-settings/:orgid/:id
DELETE/pipeline-data-settings/:orgid/:id

Pipeline Layout Settings

ENDPOINTS
GET/pipeline-layout-settings/:orgid
POST/pipeline-layout-settings/:orgid
GET/pipeline-layout-settings/:orgid/:id
PUT/pipeline-layout-settings/:orgid/:id
DELETE/pipeline-layout-settings/:orgid/:id

Pipeline Settings

ENDPOINTS
GET/pipeline-settings/:orgid
DELETE/pipeline-settings/:orgid
POST/pipeline-settings/:orgid
GET/pipeline-settings/:orgid/:settings_id
PATCH/pipeline-settings/:orgid/:settings_id
POST/pipeline-settings/clojure-async/:orgid/:settings_id

Sources

ENDPOINTS
GET/sources/:orgid/metrics
GET/sources/:orgid/metrics/distinct
POST/sources/:orgid/metrics/export

Uploads

ENDPOINTS
GET/uploads/policy
GET/uploads/:orgid
POST/uploads/:orgid
GET/uploads/:orgid/:collection
DELETE/uploads/:orgid/:collection
POST/uploads/:orgid/:collection
DELETE/uploads/:orgid/:collection/:filename

Generation Dashboards

ENDPOINTS
GET/generation-dashboards/:orgid/generations/metrics
GET/generation-dashboards/:orgid/generations

Evaluations

ENDPOINTS
POST/evaluations/auto_generate_binary_eval_config
POST/evaluations/auto_generate_score_eval_config
GET/evaluations/tests/:org_id
GET/evaluations/test/:org_id/:test_id
PATCH/evaluations/test/:org_id/:test_id
DELETE/evaluations/test/:org_id/:test_id
POST/evaluations/test/:org_id
POST/evaluations/test/run/:org_id/:test_id
GET/evaluations/test/runs/:org_id/:test_id
GET/evaluations/test/run/:org_id/:test_id/:run_id
GET/evaluations/:org_id
POST/evaluations/:org_id
GET/evaluations/:org_id/:eval_id
PUT/evaluations/:org_id/:eval_id
DELETE/evaluations/:org_id/:eval_id

Format Settings

ENDPOINTS
GET/format-settings/:userid
DELETE/format-settings/:userid
POST/format-settings/:userid
GET/format-settings/:userid/:format_id
PATCH/format-settings/:userid/:format_id

Audit Trail

ENDPOINTS
GET/audit/:orgid/history
GET/audit/:orgid/record/:table_name/:record_id
GET/audit/:orgid/user/:user_email
GET/audit/:orgid/tables
GET/audit/:orgid/actions

Agentic Search Apps

ENDPOINTS
GET/agentic-search-apps/:orgid
POST/agentic-search-apps/:orgid
GET/agentic-search-apps/:orgid/:id
PATCH/agentic-search-apps/:orgid/:id
DELETE/agentic-search-apps/:orgid/:id
GET/agentic-search-apps/:orgid/:id/download_json
PUT/agentic-search-apps/:orgid/:id/upload_logo
GET/agentic-search-apps/:orgid/:id/logo

User Authentication

ENDPOINTS
POST/signup
POST/login

User Profile

ENDPOINTS
GET/me

Utility

ENDPOINTS
GET/api/v1/api-version

integration

ENDPOINTS
GET/api/v1/integration/sources
POST/api/v1/integration/upload

organizations

ENDPOINTS
GET/api/v1/org
PATCH/api/v1/org
DELETE/api/v1/org
POST/api/v1/org
GET/api/v1/org/all
POST/api/v1/org/logo
GET/api/v1/org/key
PATCH/api/v1/org/key
DELETE/api/v1/org/key
POST/api/v1/org/key
GET/api/v1/org/models
POST/api/v1/org/models
GET/api/v1/org/models/list
GET/api/v1/org/member
PATCH/api/v1/org/member
DELETE/api/v1/org/member
POST/api/v1/org/member
GET/api/v1/org/member/list
POST/api/v1/org/member/invite
POST/api/v1/org/member/invite/validate

guardrails

ENDPOINTS
GET/api/v1/configs/guardrails
PATCH/api/v1/configs/guardrails
POST/api/v1/configs/guardrails
POST/api/v1/configs/guardrails/check/prompt
GET/api/v1/configs/guardrails/data/failures
GET/api/v1/configs/guardrails/data/names
GET/api/v1/configs/guardrails/:id
DELETE/api/v1/configs/guardrails/:id

embeddings

ENDPOINTS
POST/api/v1/embeddings/vector

user

ENDPOINTS
GET/api/v1/user/users/:id
DELETE/api/v1/user/users/:id

auth

ENDPOINTS
GET/api/v1/user/sign-out
POST/api/v1/user/token
GET/api/v1/user/current-token
POST/api/v1/user/authorize-resource
POST/api/v1/user/authorize-admin

current-org

ENDPOINTS
GET/api/v1/user/current-org

current-user

ENDPOINTS
GET/api/v1/user/current-user
POST/api/v1/user/current-user

feedback

ENDPOINTS
POST/api/v1/user/feedback
GET/api/v1/user/feedback/thumbs
POST/api/v1/user/feedback/thumbs

storyplan-config

ENDPOINTS
GET/api/v1/user/storyplan-config/schemas
POST/api/v1/user/storyplan-config/gen-mode-data
GET/api/v1/user/storyplan-config/default
POST/api/v1/user/storyplan-config/default
POST/api/v1/user/storyplan-config/upsert-by-name

Get homepage prompts

Path Parameters

api-version-string

required
GET
/prompts
1

Delete a document from project

Query Parameters

document-id

required

Path Parameters

api-version-string

required
DELETE
/project/docs
1

Retrieve a Capitol project by user

Fetches a specific Capitol project using the project ID. A project contains various documents and sources uploaded or created by the user.

Query Parameters

project-id

required, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/project
1

Update a Capitol project

Updates a Capitol project with new or existing details, including its name and sources (PDFs, images, URLs).

Path Parameters

api-version-string

required, string, default: latest

Request Body

project-id

required, string

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string

project-id

required, string

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string

project-id

required, string

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string

project-id

required, string

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string
PUT
/api/v1/project
1
EXAMPLE BODY
{
  "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"
}

Delete a Capitol project

Deletes a specified Capitol project from the user's account based on the project ID.

Query Parameters

project-id

required, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/project
1

Create a new Capitol project

Creates a new Capitol project where users can add sources (PDFs, images, URLs) and documents.

Path Parameters

api-version-string

required, string, default: latest

Request Body

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string

pdf-sources

optional, array

image-sources

optional, array

url-sources

optional, array

project-name

optional, string
POST
/api/v1/project
1
EXAMPLE BODY
{
  "pdf-sources": [],
  "image-sources": [],
  "url-sources": [
    "velit amet cillum sunt Lorem",
    null,
    null
  ],
  "project-name": "ut dolore velit laborum Ut"
}

List all Capitol projects for a user

Retrieves a list of all Capitol projects associated with the user, optionally including sources and allowing pagination through limit and offset parameters.

Query Parameters

sources

optional, boolean

limit

optional, integer

offset

optional, integer

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/project/list
1

List all Capitol documents within a project

Fetches all documents under a specified project ID, displaying all documents associated with the project.

Query Parameters

offset

optional, integer

project-id

optional, string

include-all-documents

optional, boolean

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/project/docs/list
1

Retrieve Capitol documents within a specific project

Retrieves documents within a given project, with optional pagination using offset. Allows specifying a project ID.

Query Parameters

offset

optional, integer

project-id

optional, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/project/docs
1

Move a document between projects

Transfers a document from one project to another, specified by document ID, origin project ID, and target project ID.

Query Parameters

document-id

required, string

origin-project-id

optional, string

project-id

required, string

Path Parameters

api-version-string

required, string, default: latest
PUT
/api/v1/project/docs
1

Remove a document from a project

Deletes a specified document from a project based on document ID.

Query Parameters

document-id

required, string

project-id

optional, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/project/docs
1

Retrieve sources within a project

Fetches all sources (PDFs, images, URLs) used in the documents of a specified project.

Query Parameters

project-id

optional, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/project/source
1

Copy a source to another project

Copies a source (PDF, image, or URL) from one project to another, specified by origin project ID, target project ID, and source type.

Query Parameters

origin-project-id

required, string

project-id

required, string

source-id

required, string

type

required, string

Path Parameters

api-version-string

required, string, default: latest
PUT
/api/v1/project/source
1

Delete a source from a project

Removes a specific source from a project, based on project ID, source ID, and source type.

Query Parameters

project-id

required, string

source-id

required, string

type

required, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/project/source
1

Fetch capitol events

Query Parameters

story-id

required

Path Parameters

api-version-string

required
GET
/events
1

Update a capitol event

Path Parameters

api-version-string

required

body

required, object
PATCH
/events
1

Delete a capitol event

Query Parameters

event-id

required

story-id

required

Path Parameters

api-version-string

required
DELETE
/events
1

Create a new capitol event

Path Parameters

api-version-string

required

body

required, object
POST
/events
1

Perform a bulk update operation

Path Parameters

api-version-string

required

body

required, object
PATCH
/events/bulk
1

Re order the capitol events

Path Parameters

api-version-string

required

body

required, object
POST
/events/reorder
1

Turn a event of a image into a test.

Path Parameters

api-version-string

required

body

required, object
POST
/events/turn-into
1

Retrieve Capitol events for a specific document

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.

Query Parameters

story-id

required, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/events
1

Delete a specific Capitol event

Removes a particular event from a document draft, using the event-id and story-id to identify the specific event to delete.

Query Parameters

event-id

required, string

story-id

required, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/events
1

Execute a bulk update of events within a document draft

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.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string

draft-depth

optional, integer
draft-id
optional

events

required, array

events-to-delete

optional, array

story-id

required, string

draft-depth

optional, integer
draft-id
optional

events

required, array

events-to-delete

optional, array

story-id

required, string

draft-depth

optional, integer
draft-id
optional

events

required, array

events-to-delete

optional, array

story-id

required, string

draft-depth

optional, integer
draft-id
optional

events

required, array

events-to-delete

optional, array
PATCH
/api/v1/events/bulk
1
EXAMPLE BODY
{
  "story-id": "a8faaeb4-60c6-7290-25f4-73681be8669e",
  "events": [],
  "events-to-delete": [
    "ece1d353-1b35-57c0-bac0-7aa97d7cb331"
  ]
}

Transform an event block into a different block type

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.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string

draft-id

optional, string

event-id

required, string

block-id

required, string

output-sub-type

required, string

output-type

required, string

event-id-below

optional, string

story-id

required, string

draft-id

optional, string

event-id

required, string

block-id

required, string

output-sub-type

required, string

output-type

required, string

event-id-below

optional, string

story-id

required, string

draft-id

optional, string

event-id

required, string

block-id

required, string

output-sub-type

required, string

output-type

required, string

event-id-below

optional, string

story-id

required, string

draft-id

optional, string

event-id

required, string

block-id

required, string

output-sub-type

required, string

output-type

required, string

event-id-below

optional, string
POST
/api/v1/events/turn-into
1
EXAMPLE BODY
{
  "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"
}

It creates a WS adress for processing user's pdfs and urls.

Path Parameters

api-version-string

required

body

required, object
POST
/user/sources/ws
1

Process the user sources.

Path Parameters

api-version-string

required

body

required
POST
/user/sources/upload-source
1

Retrieve sources by story id

Query Parameters

story-id

required

Path Parameters

api-version-string

required
GET
/user/sources/story
1

Create a WebSocket address for PDF and URL processing

Generates a WebSocket (WS) address for processing user-uploaded PDFs and URLs, enabling real-time communication for source processing.

Path Parameters

api-version-string

required, string, default: latest

Request Body

ws-uuid

required, string

ws-uuid

required, string

ws-uuid

required, string

ws-uuid

required, string
POST
/api/v1/user/sources/ws
1
EXAMPLE BODY
{
  "ws-uuid": "7a89af09-f7e9-37a6-7fa7-f4295b3c697a"
}

Upload and process user sources asynchronously

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.

Path Parameters

api-version-string

required, string, default: latest

Request Body

Unnamed Property

Unnamed Property

Unnamed Property

Unnamed Property

POST
/api/v1/user/sources/upload-source
1
EXAMPLE BODY
{}

Process JSON or URL user sources

Processes user-provided source data in JSON format, including source IDs, filenames, and data details, for seamless synchronization. Also accepts URLs as source-urls.

Path Parameters

api-version-string

required, string, default: latest

Request Body

source-id

required, string

filename

required, string

generate-embedding

optional, boolean, default: false

If true capitol will generate embeddings for the source

tags

optional, array, default: [{"Environment":"QA"}]

taggs to segment data

data

optional, object

Document in json format

source-url

optional, string

source-id

required, string

filename

required, string

generate-embedding

optional, boolean, default: false

If true capitol will generate embeddings for the source

tags

optional, array, default: [{"Environment":"QA"}]

taggs to segment data

data

optional, object

Document in json format

source-url

optional, string

source-id

required, string

filename

required, string

generate-embedding

optional, boolean, default: false

If true capitol will generate embeddings for the source

tags

optional, array, default: [{"Environment":"QA"}]

taggs to segment data

data

optional, object

Document in json format

source-url

optional, string

source-id

required, string

filename

required, string

generate-embedding

optional, boolean, default: false

If true capitol will generate embeddings for the source

tags

optional, array, default: [{"Environment":"QA"}]

taggs to segment data

data

optional, object

Document in json format

source-url

optional, string
POST
/api/v1/user/sources/upload-source/sync
1
EXAMPLE BODY
{
  "source-id": "5d302ec7-1d07-3cd7-e51c-635ab4234019",
  "filename": "ut",
  "data": {},
  "source-url": "anim pariatur ipsum ex ullamco"
}

Process files user's sources synchronously

Processes user-provided source data in PDF or Image format, including source IDs, filenames, and data details, for seamless synchronization.

Path Parameters

api-version-string

required, string, default: latest

Request Body

source-id

required, string

filename

required, string

file

required
POST
/api/v1/user/sources/upload-source/file
1

Retrieve sources by story ID

Fetches all sources associated with a specified story, identified by story ID, for streamlined access to related content.

Query Parameters

story-id

required, string

draft-id

optional, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/sources/story
1

Validate YouTube link

Checks if a given YouTube link is valid and can be processed, verifying compatibility for source integration.

Path Parameters

api-version-string

required, string, default: latest

Request Body

url

required, string

url

required, string

url

required, string

url

required, string
POST
/api/v1/user/sources/youtube
1
EXAMPLE BODY
{
  "url": "elit amet quis"
}

Retrieve data by organization ID

Fetches data associated with a specified organization ID, enabling access to detailed information for specific sources metrics.

Query Parameters

story-id
optional

user-query

optional, string, default: Analyzes: GDP of Peru

User query that was used to generate the story.

parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/sources/data
1

Fetch distinct values by key name

Fetch distinct values by key name

Query Parameters

key-name

required, string
story-id
optional
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/sources/data/values
1

Export source metrics to CSV

Exports source metrics to a CSV file for analysis and reporting purposes.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id
optional
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

story-id
optional
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

story-id
optional
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

story-id
optional
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

POST
/api/v1/user/sources/data/csv
1
EXAMPLE BODY
{
  "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
}

Export source metrics to JSON file

Exports source metrics to a JSON file for analysis and reporting purposes.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

optional, array of strings
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

story-id

optional, array of strings
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

story-id

optional, array of strings
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

story-id

optional, array of strings
parent-draft-id
optional
draft-id
optional

draft-depth

optional, integer

start-date

optional, string, default: null

Start date of the range in ISO 8601 format (YYYY-MM-DD)

end-date

optional, string, default: null

End date of the range in ISO 8601 format (YYYY-MM-DD)

environment

optional, string

offset

optional, integer, default: 0

Offset

limit

optional, integer, default: 10

Limit

POST
/api/v1/user/sources/data/json
1
EXAMPLE BODY
{
  "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"
}

Retrieve user default story configurations

Query Parameters

user-id

required

Path Parameters

api-version-string

required
GET
/user/storyplan-config/default
1

Fetch a particular story

Query Parameters

share-id

optional

id

optional

unfurl

optional

Path Parameters

api-version-string

required
GET
/stories/story
1

Update a story in the DB

Path Parameters

api-version-string

required

body

required, object
PUT
/stories/story
1

Delete a story from the DB

Query Parameters

id

required

Path Parameters

api-version-string

required
DELETE
/stories/story
1

Commit a new story to the DB

Path Parameters

api-version-string

required

body

required, object
POST
/stories/story
1

Fetch mini info of a particular story

Query Parameters

story-id

required

migrated

optional

Path Parameters

api-version-string

required
GET
/stories/mini
1

Fetch a particular story

Query Parameters

id

required

Path Parameters

api-version-string

required
GET
/stories/story/events
1

Patch the story visibility.

Path Parameters

api-version-string

required

body

required, object
PATCH
/stories/visibility
1

Fork a story

Path Parameters

api-version-string

required

body

required, object
POST
/stories/fork
1

Retrieve a specific story

Fetches the details of a story based on either share ID or story ID, with an optional parameter for unfurling.

Query Parameters

share-id

optional, string

id

optional, string

unfurl

optional

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/stories/story
1

Update an existing story

Updates a story in the database with modified details and an option to regenerate the unfurl.

Path Parameters

api-version-string

required, string, default: latest

Request Body

updated-story

required, object

regenerate-unfurl

required, boolean

updated-story

required, object

regenerate-unfurl

required, boolean

updated-story

required, object

regenerate-unfurl

required, boolean

updated-story

required, object

regenerate-unfurl

required, boolean
PUT
/api/v1/stories/story
1
EXAMPLE BODY
{
  "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
}

Delete a story

Removes a story from the database, identified by its ID.

Query Parameters

id

required, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/stories/story
1

Save a new story

Creates and saves a new story in the database with the provided content.

Path Parameters

api-version-string

required, string, default: latest

Request Body

id

required, string

active-draft-id

optional, string

version

optional, string, minimum length of 4

perms

optional

headline

optional
headline-id
optional
headline-event-id
optional

authors

optional

chapters

optional, array, maximum of 1 items, minimum of 1 items

created-at

optional, string

updated-at

optional, string

read-only

optional, boolean

is-active

optional, boolean

is-public

optional, boolean
is-llm-generating
optional
last-processed-llm-event-id
optional

views-count

optional, integer

like-count

optional, integer
story-plan
optional

topics

optional, array of strings

has-liked-by-me

optional, boolean

processed-llm-event-ids

optional
unfurl-image-url
optional

capitol-rank

optional
active-section-index
optional

banner

optional
parent-story-id
optional
current-depth-level
optional
project-id
optional

id

required, string

active-draft-id

optional, string

version

optional, string, minimum length of 4

perms

optional

headline

optional
headline-id
optional
headline-event-id
optional

authors

optional

chapters

optional, array, maximum of 1 items, minimum of 1 items

created-at

optional, string

updated-at

optional, string

read-only

optional, boolean

is-active

optional, boolean

is-public

optional, boolean
is-llm-generating
optional
last-processed-llm-event-id
optional

views-count

optional, integer

like-count

optional, integer
story-plan
optional

topics

optional, array of strings

has-liked-by-me

optional, boolean

processed-llm-event-ids

optional
unfurl-image-url
optional

capitol-rank

optional
active-section-index
optional

banner

optional
parent-story-id
optional
current-depth-level
optional
project-id
optional

id

required, string

active-draft-id

optional, string

version

optional, string, minimum length of 4

perms

optional

headline

optional
headline-id
optional
headline-event-id
optional

authors

optional

chapters

optional, array, maximum of 1 items, minimum of 1 items

created-at

optional, string

updated-at

optional, string

read-only

optional, boolean

is-active

optional, boolean

is-public

optional, boolean
is-llm-generating
optional
last-processed-llm-event-id
optional

views-count

optional, integer

like-count

optional, integer
story-plan
optional

topics

optional, array of strings

has-liked-by-me

optional, boolean

processed-llm-event-ids

optional
unfurl-image-url
optional

capitol-rank

optional
active-section-index
optional

banner

optional
parent-story-id
optional
current-depth-level
optional
project-id
optional

id

required, string

active-draft-id

optional, string

version

optional, string, minimum length of 4

perms

optional

headline

optional
headline-id
optional
headline-event-id
optional

authors

optional

chapters

optional, array, maximum of 1 items, minimum of 1 items

created-at

optional, string

updated-at

optional, string

read-only

optional, boolean

is-active

optional, boolean

is-public

optional, boolean
is-llm-generating
optional
last-processed-llm-event-id
optional

views-count

optional, integer

like-count

optional, integer
story-plan
optional

topics

optional, array of strings

has-liked-by-me

optional, boolean

processed-llm-event-ids

optional
unfurl-image-url
optional

capitol-rank

optional
active-section-index
optional

banner

optional
parent-story-id
optional
current-depth-level
optional
project-id
optional
POST
/api/v1/stories/story
1
EXAMPLE BODY
{
  "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
}

Fetch story events

Retrieves the sequence of events for a particular story, identified by story ID.

Query Parameters

id

required, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/stories/story/events
1

Fork an existing story

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.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string

story-id

required, string

story-id

required, string

story-id

required, string
POST
/api/v1/stories/story/fork
1
EXAMPLE BODY
{
  "story-id": "45ef6694-ca0d-bfd2-6698-985ed7760439"
}

Retry a failing story/block

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.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string

draft-id

required, string

event-id

optional, string

error-type

required, string

payload

required, object

story-id

required, string

draft-id

required, string

event-id

optional, string

error-type

required, string

payload

required, object

story-id

required, string

draft-id

required, string

event-id

optional, string

error-type

required, string

payload

required, object

story-id

required, string

draft-id

required, string

event-id

optional, string

error-type

required, string

payload

required, object
POST
/api/v1/stories/story/retry
1
EXAMPLE BODY
{
  "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": {}
}

Fetch minimal story information

Returns minimal information for a story, including ID and migration status, for lightweight requests.

Query Parameters

story-id

required, string

migrated

optional, boolean

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/stories/mini
1

Toggle story visibility

Updates the visibility status of a story, allowing it to be made public or private based on the user's preference.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string

story-id

required, string

story-id

required, string

story-id

required, string
PATCH
/api/v1/stories/visibility
1
EXAMPLE BODY
{
  "story-id": "b51eede2-eb96-371a-4c56-70836858b116"
}

Duplicate a block in a story.

Path Parameters

api-version-string

required

body

required, object
POST
/stories/fork-block
1

Remix a complete story.

Path Parameters

api-version-string

required

body

required, object
POST
/stories/remix/story
1

Remix a complete story

Creates a new version of a story by remixing it with optional user-defined configurations and a specified plan.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string
parent-draft-id
optional

user-config-params

optional

story-plan-config-id

optional, string

story-id

required, string
parent-draft-id
optional

user-config-params

optional

story-plan-config-id

optional, string

story-id

required, string
parent-draft-id
optional

user-config-params

optional

story-plan-config-id

optional, string

story-id

required, string
parent-draft-id
optional

user-config-params

optional

story-plan-config-id

optional, string
POST
/api/v1/stories/remix/story
1
EXAMPLE BODY
{
  "story-id": "a0fb64e9-e651-629f-47e0-d840801a9ced",
  "parent-draft-id": "laboris in",
  "user-config-params": {},
  "story-plan-config-id": "228ae108-1a63-5241-3947-c3b32b1a8152"
}

Fetch a list of stories. Based on the search params and in the filters.

Query Parameters

sort-by

required

topic-values

optional

search-value

optional

modes

optional

own

optional

private

optional

delete

optional

limit

optional

offset

optional

Path Parameters

api-version-string

required
GET
/stories/feed
1

Request chat_id and socket_address

Path Parameters

api-version-string

required

body

required, object
POST
/chat/async
1

Initiate document generation and obtain streaming address

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.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

optional, string

tags

optional, array

project-id

optional, string

user-config-params

optional, default: {"user-query":"Make a story"}

story-plan-config-id

optional, string

source-ids

optional, array of strings

story-id

optional, string

tags

optional, array

project-id

optional, string

user-config-params

optional, default: {"user-query":"Make a story"}

story-plan-config-id

optional, string

source-ids

optional, array of strings

story-id

optional, string

tags

optional, array

project-id

optional, string

user-config-params

optional, default: {"user-query":"Make a story"}

story-plan-config-id

optional, string

source-ids

optional, array of strings

story-id

optional, string

tags

optional, array

project-id

optional, string

user-config-params

optional, default: {"user-query":"Make a story"}

story-plan-config-id

optional, string

source-ids

optional, array of strings
POST
/api/v1/chat/async
1
EXAMPLE BODY
{
  "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": []
}

Request prompt suggestions for Block level chat

Path Parameters

api-version-string

required

body

required, object
POST
/chat/block-suggestions
1

Retrieve chat history for a story or component

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.

Query Parameters

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

component-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Component ID

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/chat
1

Submit a user message and receive an agent’s response

Sends a new user message to the chat and returns an automated response from the agent.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

draft-number

optional, integer, default: 0

Draft number

block-id
optional, default: 00000000-0000-0000-0000-000000000000

Block ID

event-id
optional, default: 00000000-0000-0000-0000-000000000000

Event ID

user-chat-message

optional, string, default: User chat message

User chat message

user-chat-params

optional, object, default: {}

User chat params

new-block

optional, boolean, default: false

New block

new-block-params

optional, object, default: {}

New block params

cyoa

optional, boolean, default: false

CYOA

options

optional, array, default: []

Options

custom-options

optional, array

Custom options

topics

optional, array of strings

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

draft-number

optional, integer, default: 0

Draft number

block-id
optional, default: 00000000-0000-0000-0000-000000000000

Block ID

event-id
optional, default: 00000000-0000-0000-0000-000000000000

Event ID

user-chat-message

optional, string, default: User chat message

User chat message

user-chat-params

optional, object, default: {}

User chat params

new-block

optional, boolean, default: false

New block

new-block-params

optional, object, default: {}

New block params

cyoa

optional, boolean, default: false

CYOA

options

optional, array, default: []

Options

custom-options

optional, array

Custom options

topics

optional, array of strings

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

draft-number

optional, integer, default: 0

Draft number

block-id
optional, default: 00000000-0000-0000-0000-000000000000

Block ID

event-id
optional, default: 00000000-0000-0000-0000-000000000000

Event ID

user-chat-message

optional, string, default: User chat message

User chat message

user-chat-params

optional, object, default: {}

User chat params

new-block

optional, boolean, default: false

New block

new-block-params

optional, object, default: {}

New block params

cyoa

optional, boolean, default: false

CYOA

options

optional, array, default: []

Options

custom-options

optional, array

Custom options

topics

optional, array of strings

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

draft-number

optional, integer, default: 0

Draft number

block-id
optional, default: 00000000-0000-0000-0000-000000000000

Block ID

event-id
optional, default: 00000000-0000-0000-0000-000000000000

Event ID

user-chat-message

optional, string, default: User chat message

User chat message

user-chat-params

optional, object, default: {}

User chat params

new-block

optional, boolean, default: false

New block

new-block-params

optional, object, default: {}

New block params

cyoa

optional, boolean, default: false

CYOA

options

optional, array, default: []

Options

custom-options

optional, array

Custom options

topics

optional, array of strings
POST
/api/v1/chat
1
EXAMPLE BODY
{
  "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": []
}

Reset chat history for a specific block

Notifies the backend to reset the chat history for a designated block based on recent user actions.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string

draft-id

required, string

block-id

required, string

story-id

required, string

draft-id

required, string

block-id

required, string

story-id

required, string

draft-id

required, string

block-id

required, string

story-id

required, string

draft-id

required, string

block-id

required, string
POST
/api/v1/chat/reset-block-chat
1
EXAMPLE BODY
{
  "story-id": "2f4e617d-a74d-d9bf-5350-94f1b03b9fb3",
  "draft-id": "5fa1885d-ea46-04f2-5d53-532ae4f7147d",
  "block-id": "3715d8c0-7b0c-d419-41cb-3716b110eb07"
}

Request prompt suggestions for a content block

Generates a list of suggested prompts for modifying a specific content block, such as making a text block longer or more detailed.

Path Parameters

api-version-string

required, string, default: latest

Request Body

block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
POST
/api/v1/chat/block-suggestions
1
EXAMPLE BODY
{
  "story-id": "0b3e23bc-8282-58da-7754-a7b4a6377e01",
  "event-id": "ea10ea31-8bdc-5829-754a-4ea7ed5ae1e3",
  "draft-id": "aute mollit dolore ut nulla"
}

Request prompt suggestions for a content block

Generates a list of suggested prompts for modifying a specific content block, such as making a text block longer or more detailed.

Path Parameters

api-version-string

required, string, default: latest

Request Body

block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
block-id
optional

block-subtype

optional, string

block-type

optional, string

new-block

optional, boolean

local-context

optional, array
story-id
required
event-id
required
draft-id
optional
POST
/api/v1/chat/suggestions/block
1
EXAMPLE BODY
{
  "block-id": "440bb8e2-8232-4e49-0507-7091926a736f",
  "block-subtype": "in",
  "new-block": false,
  "story-id": "Duis Lorem",
  "event-id": "87576cf0-93f6-0843-5196-3d7fc7806a1a"
}

Request prompt suggestions for a completed draft

Generates a list of suggested prompts for modifying a completed draft.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

required, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

required, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

required, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

draft-id

required, string, default: 00000000-0000-0000-0000-000000000000

Draft ID

POST
/api/v1/chat/suggestions/draft
1
EXAMPLE BODY
{
  "story-id": "00000000-0000-0000-0000-000000000000",
  "draft-id": "00000000-0000-0000-0000-000000000000"
}

Stop the ongoing story generation

Stops the story generation process based on the provided story-id parameter.

Path Parameters

api-version-string

required, string, default: latest

Request Body

external-id

required, string

external-id

required, string

external-id

required, string

external-id

required, string
POST
/api/v1/chat/cancel
1
EXAMPLE BODY
{
  "external-id": "f680c58c-f0a8-77b4-1910-2dd3d873082b"
}

List Dynamodb Schemas

GET
/dynamodb-schemas
1

List All Scheduled Pipelines

Retrieve all scheduled pipelines for all organizations. The list contains pipeline settings with either cron or datetime_trigger not null.

GET
/scheduled-pipelines
1

Lookup Api Key By Value

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

Query Parameters

api_key

required, string

The API key value to look up

GET
/internal-api-keys/lookup
1

Health Check

GET
/health
1

App Version

Use to confirm which version is running. Pulls from pyproject.toml

GET
/version
1

Ping Sentry

Check sentry.io connection, should return a hash response

GET
/ping-sentry
1

Validate authentication token

Validates an authentication token by forwarding it to the authentication service. Use the Authorize button to set the X-User-Token header.

Headers

authorization
optional
POST
/auth/validate
1

Check authentication token

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.

Headers

authorization
optional
POST
/auth/check
1

List Org Qdrant Clusters

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/qdrant-clusters/:orgid
1

Create Org Qdrant Cluster

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

orgid

required, string

Organization ID

url

required, string

URL of the Qdrant cluster

ssm_parameter_arn

required, string

ARN of the API key in AWS SSM Parameter Store

POST
/qdrant-clusters/:orgid
1
EXAMPLE BODY
{
  "orgid": "org-123456",
  "ssm_parameter_arn": "arn:aws:secretsmanager:region:account:secret:qdrant-api-key",
  "url": "https://qdrant-cluster.example.com"
}

Get Org Qdrant Cluster

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

cluster_id

required, string

Cluster ID

GET
/qdrant-clusters/:orgid/:cluster_id
1

Update Org Qdrant Cluster

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

cluster_id

required, string

Cluster ID

Request Body

url
optional

URL of the Qdrant cluster

ssm_parameter_arn
optional

ARN of the API key in AWS Secrets Manager

PATCH
/qdrant-clusters/:orgid/:cluster_id
1
EXAMPLE BODY
{
  "ssm_parameter_arn": "arn:aws:secretsmanager:region:account:secret:updated-qdrant-api-key",
  "url": "https://updated-qdrant-cluster.example.com"
}

Delete Org Qdrant Cluster

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

cluster_id

required, string

Cluster ID

DELETE
/qdrant-clusters/:orgid/:cluster_id
1

Get All Changelogs

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).

Headers

authorization
optional

Query Parameters

published_only

optional, boolean, default: true

If True, returns only published changelogs. If False, returns all changelogs.

GET
/changelog
1

Create Changelog

Create a new changelog entry.

Args: changelog (ChangelogCreate): The changelog entry to create.

Returns: Changelog: The created changelog entry.

Headers

authorization
optional

Request Body

service_name

required, string

The name of the service

release_id

required, string

The release identifier

release_date

required, string

The date when the release was published

notes

required, string

Release notes

published

optional, boolean, default: false

Whether the changelog entry is published

POST
/changelog
1
EXAMPLE BODY
{
  "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
}

Get Changelogs By Service

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.

Headers

authorization
optional

Path Parameters

service_name

required, string

The name of the service to fetch changelog entries for.

GET
/changelog/service-name/:service_name
1

Get Changelog

Retrieve a specific changelog entry by ID.

Args: changelog_id (str): The changelog ID.

Returns: Changelog: The requested changelog entry.

Headers

authorization
optional

Path Parameters

changelog_id

required, string

The ID of the changelog entry to fetch.

GET
/changelog/by-id/:changelog_id
1

Update Changelog

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.

Headers

authorization
optional

Path Parameters

changelog_id

required, string

The ID (uuid) of the changelog entry to update.

Request Body

service_name
optional

The name of the service

release_id
optional

The release identifier

release_date
optional

The date when the release was published

notes
optional

Release notes

published
optional

Whether the changelog entry is published

PATCH
/changelog/:changelog_id
1
EXAMPLE BODY
{
  "release_date": "2024-03-21T00:00:00Z",
  "notes": "Updated release notes.",
  "published": true
}

Delete Changelog

Delete a changelog entry.

Args: changelog_id (str): The changelog ID.

Headers

authorization
optional

Path Parameters

changelog_id

required, string

The ID of the changelog entry to delete.

DELETE
/changelog/:changelog_id
1

Get Api Key

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The unique ID of the API key to fetch.

GET
/client-api-keys/:orgid/:id
1

Delete Client Api Key

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

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The unique ID of the API key to delete.

DELETE
/client-api-keys/:orgid/:id
1

Get Client Api Keys

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/client-api-keys/:orgid
1

Create Client Api Key

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

orgid
optional

The organization ID (uuid)

key_name

required, string

Unique name of the API key

description
optional, default:

Description of the API key

api_key
optional

The actual API key value

ssm_parameter_arn
optional

SSM ARN (system generated)

active

optional, boolean, default: true

Whether the API key is active

environment

optional, string enum, default: prod

Environment (dev or prod)

Possible Enum Values

staging

dev

prod

POST
/client-api-keys/:orgid
1
EXAMPLE BODY
{
  "key_name": "openai_key",
  "service_name": "OpenAI",
  "description": "API key for OpenAI services",
  "api_key": "sk-proj-secret-key-123456",
  "active": true
}

Get Guardrails

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/guardrails/:orgid/all
1

Get Guardrail

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

guardrail_id

required, string

The ID of the guardrail to fetch.

GET
/guardrails/:orgid/:guardrail_id
1

Patch Guardrail

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

guardrail_id

required, string

The ID of the guardrail to update.

Request Body

name
optional
guardrail_description
optional
pass_criteria
optional
fail_criteria
optional
active
optional
override
optional
environment
optional
examples
optional
PATCH
/guardrails/:orgid/:guardrail_id
1
EXAMPLE BODY
{
  "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 Guardrail

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

guardrail_id

required, string

The ID of the guardrail to delete.

DELETE
/guardrails/:orgid/:guardrail_id
1

Create Guardrail Config From Description

Create a guardrail configuration from a description.

Headers

authorization
optional

Request Body

description

required, string

The description of the guardrail to create

POST
/guardrails/create-guardrail-config-from-description
1
EXAMPLE BODY
{
  "description": "do not allow non-fictional prompts"
}

Put Guardrail

Insert a new guardrail configuration for a given organization ID.

Args: guardrail (GuardrailConfig): The guardrail configuration to insert.

Returns: GuardrailConfig: The inserted guardrail configuration.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

guardrail_id
optional

Unique identifier for the guardrail (will be generated if not provided)

name

required, string

Name of the guardrail

guardrail_description

required, string

Description of the guardrail

pass_criteria

required, string

Criteria for passing the guardrail

fail_criteria

required, string

Criteria for failing the guardrail

examples

required, string

Examples demonstrating the guardrail's behavior as a string

created_at
optional

Timestamp of guardrail creation (will be generated on the server)

updated_at
optional

Timestamp of last update (will be generated on the server)

active

optional, boolean, default: true

Whether the guardrail is active

override

optional, boolean, default: false

Whether the guardrail can be overridden

POST
/guardrails/:orgid
1
EXAMPLE BODY
{
  "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
}

Get Guardrails Failures

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" } ] }

Headers

authorization
optional

Query Parameters

name
optional

Filter by guardrail name

env
optional

The environment for the API key (e.g., 'prod', 'dev')

offset

optional, integer, default: 0, minimum value of 0

Starting position for pagination

limit

optional, integer, default: 10, maximum value of 100, minimum value of 1

Maximum number of results to return

sort_by
optional, default: timestamp

Field to sort by

sort_order

optional, string enum, default: desc

Sort order

Possible Enum Values

asc

desc

start_date
optional

Start date in ISO format (e.g., 2024-01-01)

end_date
optional

End date in ISO format (e.g., 2024-12-31)

Path Parameters

orgid

required, string

The ID of the organization to fetch guardrails failures for.

GET
/guardrails/:orgid/failures
1

Get Distinct Guardrails Failures Names

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"] }

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/guardrails/:orgid/failures/names
1

Check Guardrails Prompt

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 } ]

Headers

authorization
optional

Query Parameters

skip_override

optional, boolean, default: false

Skip guardrails that can be overridden (override=true)

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

story_id

optional, string, default: 00000000-0000-0000-0000-000000000000

user_query

required, string
POST
/guardrails/:orgid/check/prompt
1
EXAMPLE BODY
{
  "story_id": "00000000-0000-0000-0000-000000000000",
  "user_query": "Generate a report on climate change policy"
}

Get All Organizations Api Keys

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

GET
/internal-api-keys
1

Get Organization Api Keys

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/internal-api-keys/:orgid
1

Create Internal Api Key

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

orgid
optional

The organization ID (will be taken from path parameter)

description
required

Description of the API key

name

required, string

Name of the API key

api_key
optional

Optional custom API key value. If not provided, a key will be generated automatically.

POST
/internal-api-keys/:orgid
1
EXAMPLE BODY
{
  "description": "My Custom API Key",
  "name": "prod key"
}

Delete Internal Api 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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The uuid of the API key to delete.

DELETE
/internal-api-keys/:orgid/:id
1

Get All Organizations

Retrieve all organizations.

Args: request (Request): The incoming request

Returns: List[Organization]: A list of all organizations.

Headers

authorization
optional
GET
/organizations
1

Create a new organization

Create a new organization with an auto-generated ID or a custom ID

Headers

authorization
optional

Request Body

name

required, string

Name of the organization

orgid
optional

Optional organization ID (UUID will be generated if not provided)

POST
/organizations
1
EXAMPLE BODY
{
  "name": "ACME Organization"
}

Get Current User Organizations

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

Headers

authorization
optional
GET
/organizations/me
1

Get Organization

Retrieve a specific organization by ID.

Args: orgid (str): The organization ID.

Returns: Organization: The requested organization.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/organizations/:orgid
1

Update Organization

Update an existing organization.

Args: orgid (str): The organization ID. updates (OrganizationCreate): The updates to apply to the organization.

Returns: Organization: The updated organization.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

name

required, string

Name of the organization

orgid
optional

Optional organization ID (UUID will be generated if not provided)

PUT
/organizations/:orgid
1
EXAMPLE BODY
{
  "name": "Updated Organization Name"
}

Delete Organization

Delete an organization.

Args: orgid (str): The organization ID.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

DELETE
/organizations/:orgid
1

Upload Organization Logo

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

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

file

required, string

The logo image file to upload

POST
/organizations/:orgid/logo
1

Get All Organization Invites

Retrieve all Organization Members across all organizations.

Returns: List[Dict[str, Any]]: A list of all Organization Members.

Headers

authorization
optional
GET
/org-members/invites
1

Get Organization Members

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The organization ID to get invites for

GET
/org-members/:orgid/invites
1

Create Org Member

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The organization ID to member the user to

Request Body

email

required, string

Email address of the invitee

origin
optional

Origin of the invitation (max 40 characters)

role
optional

Role to assign to the invitee (max 20 characters)

POST
/org-members/:orgid/invites
1
EXAMPLE BODY
{
  "email": "[email protected]",
  "origin": "admin-portal",
  "role": "editor"
}

Update Org Member

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The organization ID

invite_id

required, string

The ID of the organization member to update

Request Body

role
optional

Updated role to assign to the invitee (max 20 characters)

status
optional

Updated status of the invitation (pending, accepted, rejected)

PATCH
/org-members/:orgid/invites/:invite_id
1
EXAMPLE BODY
{
  "role": "admin"
}

Delete Org Member

Delete an organization invite.

Args: orgid (UUID): The organization ID. invite_id (str): The ID of the organization invite to delete.

Headers

authorization
optional

Path Parameters

orgid

required, string

The organization ID

invite_id

required, string

The ID of the organization member to delete

DELETE
/org-members/:orgid/invites/:invite_id
1

Accept Org Member

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The organization ID

invite_id

required, string

The ID of the organization member to accept

GET
/org-members/:orgid/invites/:invite_id/accept
1

Accept Org Member

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The organization ID

invite_id

required, string

The ID of the organization member to accept

POST
/org-members/:orgid/invites/:invite_id/accept
1

Get Members By Email

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.

Headers

authorization
optional

Path Parameters

email

required, string

The email address to look up members for

GET
/org-members/invites/email/:email
1

Get All Org Prompts

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.

Headers

authorization
optional

Query Parameters

is_example

optional, boolean

Filter by example status. If true, returns example prompts. If false, returns suggested prompts. If not provided, returns all prompts.

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/org-prompts/:orgid
1

Create Org Prompt

Create a new organization prompt.

Args: prompt (OrgPromptCreate): The prompt to create.

Returns: OrgPrompt: The created prompt.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

orgid
optional

The organization ID (will be taken from path parameter)

prompt

required, string

The prompt text

is_example

optional, boolean, default: false

If true, this is an example prompt. If false, this is a suggested prompt.

environment
optional

Environment (staging, dev, prod)

POST
/org-prompts/:orgid
1
EXAMPLE BODY
{
  "prompt": "Generate a report on the latest political developments.",
  "is_example": false
}

Get Single Org Prompt

Retrieve a specific prompt for an organization.

Args: orgid (str): The organization ID. prompt_id (str): The prompt ID.

Returns: OrgPrompt: The requested prompt.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

prompt_id

required, string

The ID of the prompt to fetch.

GET
/org-prompts/:orgid/:prompt_id
1

Update Org Prompt

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

prompt_id

required, string

The ID of the prompt to update.

Request Body

prompt
optional

The prompt text

is_example
optional

Whether this is an example prompt

PUT
/org-prompts/:orgid/:prompt_id
1
EXAMPLE BODY
{
  "prompt": "Generate a report on the latest economic developments.",
  "is_example": true
}

Delete Org Prompt

Delete an organization prompt.

Args: orgid (str): The organization ID. prompt_id (str): The prompt ID.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

prompt_id

required, string

The ID of the prompt to delete.

DELETE
/org-prompts/:orgid/:prompt_id
1

Regenerate Org Prompts

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.

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

POST
/org-prompts/:orgid/regenerate
1

List Pipeline Basic Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/pipeline-basic-settings/:orgid
1

Create Pipeline Basic Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

model

required, string

Model name

custom_instruction

required, string

Custom instruction

chain_of_thought

optional, boolean, default: false

Chain of thoughts enabled

length

optional, string, default: 3 pages

Length

language

optional, string, default: en

Language

audience

optional, string, default: General

Audience

cron
optional

Cron expression for scheduling (optional, will be used for scheduled pipelines)

datetime_trigger
optional

Datetime for scheduling (optional, will be used for scheduled pipelines)

POST
/pipeline-basic-settings/:orgid
1
EXAMPLE BODY
{
  "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"
}

Get Pipeline Basic Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline basic settings to retrieve.

GET
/pipeline-basic-settings/:orgid/:id
1

Update Pipeline Basic Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline basic settings to update.

Request Body

model

required, string

Model name

custom_instruction

required, string

Custom instruction

chain_of_thought

optional, boolean, default: false

Chain of thoughts enabled

length

optional, string, default: 3 pages

Length

language

optional, string, default: en

Language

audience

optional, string, default: General

Audience

cron
optional

Cron expression for scheduling (optional, will be used for scheduled pipelines)

datetime_trigger
optional

Datetime for scheduling (optional, will be used for scheduled pipelines)

PUT
/pipeline-basic-settings/:orgid/:id
1
EXAMPLE BODY
{
  "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

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline basic settings to delete.

DELETE
/pipeline-basic-settings/:orgid/:id
1

List Pipeline Blocks Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/pipeline-blocks-settings/:orgid
1

Create Pipeline Blocks Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

paragraphs

optional, boolean, default: true

Enable/disable paragraphs blocks

headers

optional, boolean, default: true

Enable/disable headers blocks

hero_image

optional, boolean, default: true

Enable/disable hero image blocks

web_image

optional, boolean, default: true

Enable/disable web image blocks

ai_image

optional, boolean, default: true

Enable/disable AI image blocks

ai_charts

optional, boolean, default: true

Enable/disable AI charts blocks

web_charts

optional, boolean, default: true

Enable/disable web charts blocks

tables

optional, boolean, default: true

Enable/disable tables blocks

metrics

optional, boolean, default: true

Enable/disable metrics blocks

quotes

optional, boolean, default: true

Enable/disable quotes blocks

lists

optional, boolean, default: true

Enable/disable lists blocks

image_style

required, string enum

Style for generated images

Possible Enum Values

argento

avery

bergman

buoyant

celray

faber

goldin

image_height

required, integer

Height of generated images in pixels

image_width

required, integer

Width of generated images in pixels

POST
/pipeline-blocks-settings/:orgid
1
EXAMPLE BODY
{
  "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
}

Get Pipeline Blocks Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline blocks settings to retrieve.

GET
/pipeline-blocks-settings/:orgid/:id
1

Update Pipeline Blocks Settings

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline blocks settings to update.

Request Body

paragraphs

optional, boolean, default: true

Enable/disable paragraphs blocks

headers

optional, boolean, default: true

Enable/disable headers blocks

hero_image

optional, boolean, default: true

Enable/disable hero image blocks

web_image

optional, boolean, default: true

Enable/disable web image blocks

ai_image

optional, boolean, default: true

Enable/disable AI image blocks

ai_charts

optional, boolean, default: true

Enable/disable AI charts blocks

web_charts

optional, boolean, default: true

Enable/disable web charts blocks

tables

optional, boolean, default: true

Enable/disable tables blocks

metrics

optional, boolean, default: true

Enable/disable metrics blocks

quotes

optional, boolean, default: true

Enable/disable quotes blocks

lists

optional, boolean, default: true

Enable/disable lists blocks

image_style

required, string enum

Style for generated images

Possible Enum Values

argento

avery

bergman

buoyant

celray

faber

goldin

image_height

required, integer

Height of generated images in pixels

image_width

required, integer

Width of generated images in pixels

PUT
/pipeline-blocks-settings/:orgid/:id
1
EXAMPLE BODY
{
  "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

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline blocks settings to delete.

DELETE
/pipeline-blocks-settings/:orgid/:id
1

List pipeline data settings

List all pipeline data settings for an organization

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/pipeline-data-settings/:orgid
1

Create new pipeline data settings

Create new pipeline data settings for an organization

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

search_sources

optional, object

Dictionary containing search source configuration

search_depth

optional, string enum, default: default

Search depth level (very shallow, shallow, default, deep, very deep)

Possible Enum Values

very shallow

shallow

default

deep

very deep

existing_rag
optional

Optional dictionary containing RAG data with user_pdf_documents and user_images

rag_collections
optional

Optional list of RAG collection to use

POST
/pipeline-data-settings/:orgid
1
EXAMPLE BODY
{
  "search_sources": {
    "academic_web_search": false,
    "web_search": false,
    "use_perplexity": true
  },
  "search_depth": "deep",
  "rag_collections": [
    "collection-1",
    "collection-2"
  ]
}

Get pipeline data settings by ID

Retrieve specific pipeline data settings for an organization

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the settings to retrieve.

GET
/pipeline-data-settings/:orgid/:id
1

Update pipeline data settings

Update existing pipeline data settings

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the settings to update.

Request Body

search_sources

optional, object

Dictionary containing search source configuration

search_depth

optional, string enum, default: default

Search depth level (very shallow, shallow, default, deep, very deep)

Possible Enum Values

very shallow

shallow

default

deep

very deep

existing_rag
optional

Optional dictionary containing RAG data with user_pdf_documents and user_images

rag_collections
optional

Optional list of RAG collection to use

PATCH
/pipeline-data-settings/:orgid/:id
1
EXAMPLE BODY
{
  "search_sources": {
    "academic_web_search": true,
    "web_search": false,
    "use_perplexity": false
  },
  "search_depth": "deep",
  "rag_collections": [
    "collection-3",
    "collection-4"
  ]
}

Delete pipeline data settings

Delete existing pipeline data settings

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the settings to delete.

DELETE
/pipeline-data-settings/:orgid/:id
1

List Layouts

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/pipeline-layout-settings/:orgid
1

Create Layout

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

blocks

optional, array

List of layout blocks

POST
/pipeline-layout-settings/:orgid
1
EXAMPLE BODY
{
  "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"
          }
        ]
      }
    }
  ]
}

Get Layout

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline layout settings to retrieve.

GET
/pipeline-layout-settings/:orgid/:id
1

Update Layout

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline layout settings to update.

Request Body

blocks

optional, array

List of layout blocks

PUT
/pipeline-layout-settings/:orgid/:id
1
EXAMPLE BODY
{
  "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 Layout

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.

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the pipeline layout settings to delete.

DELETE
/pipeline-layout-settings/:orgid/:id
1

List Pipeline Settings

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/pipeline-settings/:orgid
1

Delete Pipeline Settings

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

settings_ids

required, array of strings

List of pipeline settings IDs to delete

DELETE
/pipeline-settings/:orgid
1
EXAMPLE BODY
{
  "settings_ids": [
    "laboris esse commodo dolore anim"
  ]
}

Create Pipeline Settings

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

name

required, string

Config name

basic_settings
optional

Basic settings object

data_settings
optional

Data settings object

blocks_settings
optional

Blocks settings object

layout_settings
optional

Layout settings object

POST
/pipeline-settings/:orgid
1
EXAMPLE BODY
{
  "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"
            }
          ]
        }
      }
    ]
  }
}

Get Pipeline Settings

Headers

authorization
optional

Query Parameters

format

optional, string, default: default

Format of the response, e.g., 'clojure' for Clojure async format

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

settings_id

required, string

Settings ID

GET
/pipeline-settings/:orgid/:settings_id
1

Update Pipeline Settings

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

settings_id

required, string

Settings ID

Request Body

name
optional

Config name

basic_settings
optional

Basic settings object

data_settings
optional

Data settings object

blocks_settings
optional

Blocks settings object

layout_settings
optional

Layout settings object

PATCH
/pipeline-settings/:orgid/:settings_id
1
EXAMPLE BODY
{
  "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"
    ]
  }
}

Clojure Async

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

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

settings_id

required, string

Settings ID

Request Body

user_query

required, string
POST
/pipeline-settings/clojure-async/:orgid/:settings_id
1
EXAMPLE BODY
{
  "user_query": "Make a story about the capital of France"
}

Get Source Metrics

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

Headers

authorization
optional

Query Parameters

draft_depth
optional

Filter by draft depth

parent_draft_id
optional

Filter by parent draft ID

draft_id
optional

Filter by draft ID

story_id
optional

Filter by story ID

user_query
optional

Filter by user query

offset

optional, integer, default: 0, minimum value of 0

Starting position for pagination

limit

optional, integer, default: 10, maximum value of 100, minimum value of 1

Maximum number of results to return

start_date
optional

Start date in YYYY-MM-DD format

end_date
optional

End date in YYYY-MM-DD format

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/sources/:orgid/metrics
1

Get Distinct Values

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

Headers

authorization
optional

Query Parameters

key_name

required, string

The name of the field to get distinct values for

draft_depth
optional

Filter by draft depth

parent_draft_id
optional

Filter by parent draft ID

draft_id
optional

Filter by draft ID

story_id
optional

Filter by story ID

user_query
optional

Filter by user query

start_date
optional

Start date in YYYY-MM-DD format

end_date
optional

End date in YYYY-MM-DD format

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/sources/:orgid/metrics/distinct
1

Export Metrics Endpoint

Export source metrics to CSV or JSON.

This endpoint:

  1. Fetches data using search_with_filters
  2. Creates a file in the requested format
  3. Uploads the file to S3 bucket
  4. Deletes the local file after uploading

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

Headers

authorization
optional

Query Parameters

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

format

optional, string enum, default: csv

Export format (csv or json)

Possible Enum Values

csv

json

draft_depth
optional

Filter by draft depth

parent_draft_id
optional

Filter by parent draft ID

draft_id
optional

Filter by draft ID

story_id
optional

Filter by story ID

user_query
optional

Filter by user query

start_date
optional

Start date in ISO format (e.g., 2024-01-01)

end_date
optional

End date in ISO format (e.g., 2024-12-31)

POST
/sources/:orgid/metrics/export
1
EXAMPLE BODY
{
  "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 Upload Policy

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.

Headers

authorization
optional
GET
/uploads/policy
1

List Collections

List all collections for an organization.

Args: orgid (str): Organization ID (must be a valid UUID)

Returns: dict: Status and list of collections

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/uploads/:orgid
1

Create Collection

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

Headers

authorization
optional

Query Parameters

collection

required, string

Name of the collection to create

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

POST
/uploads/:orgid
1

List Collection Files

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

Headers

authorization
optional

Query Parameters

order_by

optional, string, default: name_asc

Sort order for files: name_asc, name_desc, upload_asc, upload_desc, size_asc, size_desc

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

collection

required, string

Sub-directory within the organization folder

GET
/uploads/:orgid/:collection
1

Delete Collection

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

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

collection

required, string

Name of the collection to delete

DELETE
/uploads/:orgid/:collection
1

Upload Files

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

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

collection

required, string

Optional sub-directory within the organization folder

Request Body

files

required, array of strings

Files to upload

POST
/uploads/:orgid/:collection
1

Delete File

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

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

collection

required, string

Sub-directory within the organization folder

filename

required, string

Name of the file to delete

DELETE
/uploads/:orgid/:collection/:filename
1

Get Generation Metrics

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

Headers

authorization
optional

Query Parameters

start_date
optional

Start date in YYYY-MM-DD format (defaults to 30 days ago)

end_date
optional

End date in YYYY-MM-DD format (defaults to today)

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/generation-dashboards/:orgid/generations/metrics
1

Get Generations

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

Headers

authorization
optional

Query Parameters

status
optional, enum

Filter by status

offset

optional, integer, default: 0, minimum value of 0

Starting position for pagination

limit

optional, integer, default: 10, maximum value of 100, minimum value of 1

Maximum number of results to return

start_date
optional

Start date in YYYY-MM-DD format

end_date
optional

End date in YYYY-MM-DD format

env

optional, string

The environment for the API key (e.g., 'prod', 'dev')

sort_by

optional, string, default: created_at

Field to sort by

sort_order

optional, string, default: desc

Sort order (asc or desc)

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/generation-dashboards/:orgid/generations
1

Auto Generate Binary Eval Config

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.

Headers

authorization
optional

Request Body

model

required, string enum

Possible Enum Values

gpt-4o-mini

gpt-4o

claude-sonnet-3.5

claude-sonnet-3.7

cerebras-llama-3.3-70b

eval_desc

required, string

na_allowed

required, boolean
POST
/evaluations/auto_generate_binary_eval_config
1
EXAMPLE BODY
{
  "model": "gpt-4o-mini",
  "eval_desc": "ut nulla dolor tempor sit",
  "na_allowed": true
}

Auto Generate Score Eval Config

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.

Headers

authorization
optional

Request Body

model

required, string enum

Possible Enum Values

gpt-4o-mini

gpt-4o

claude-sonnet-3.5

claude-sonnet-3.7

cerebras-llama-3.3-70b

eval_desc

required, string

min_score

required, integer

max_score

required, integer
POST
/evaluations/auto_generate_score_eval_config
1
EXAMPLE BODY
{
  "model": "gpt-4o",
  "eval_desc": "in Excepteur magna do",
  "min_score": 75186824,
  "max_score": -38940173
}

List Tests

GET /tests/{org_id}

Headers

authorization
optional

Path Parameters

org_id

required, string
GET
/evaluations/tests/:org_id
1

Get Test

GET /test/{org_id}/{test_id}

Headers

authorization
optional

Path Parameters

org_id

required, string

test_id

required, string
GET
/evaluations/test/:org_id/:test_id
1

Update Test Config

PATCH /test/runs/{org_id}/{test_id}

Headers

authorization
optional

Path Parameters

org_id

required, string

test_id

required, string

Request Body

id

required, string

name

required, string

evaluations

required, array of strings

test_type

required, string enum

Possible Enum Values

content_test

pipeline_test

test_config
required
PATCH
/evaluations/test/:org_id/:test_id
1
EXAMPLE BODY
{
  "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

DELETE /test/{org_id}/{test_id}

Headers

authorization
optional

Path Parameters

org_id

required, string

test_id

required, string
DELETE
/evaluations/test/:org_id/:test_id
1

Create Test

POST /{org_id}/tests

Headers

authorization
optional

Path Parameters

org_id

required, string

Request Body

id

required, string

name

required, string

evaluations

required, array of strings

test_type

required, string enum

Possible Enum Values

content_test

pipeline_test

test_config
required
POST
/evaluations/test/:org_id
1
EXAMPLE BODY
{
  "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"
    ]
  }
}

Run Test

PUT /{org_id}/tests/{test_id}

Headers

authorization
optional

Path Parameters

org_id

required, string

test_id

required, string
POST
/evaluations/test/run/:org_id/:test_id
1

List Test Runs

GET /test/runs/{org_id}/{test_id}

Headers

authorization
optional

Path Parameters

org_id

required, string

test_id

required, string
GET
/evaluations/test/runs/:org_id/:test_id
1

Get Test Run

Headers

authorization
optional

Path Parameters

org_id

required, string

test_id

required, string

run_id

required, string
GET
/evaluations/test/run/:org_id/:test_id/:run_id
1

List Evaluations

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.

Headers

authorization
optional

Path Parameters

org_id

required, string

The ID of the organization to list evaluations for.

GET
/evaluations/:org_id
1

Create Evaluation

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.

Headers

authorization
optional

Path Parameters

org_id

required, string

The ID of the organization to create the evaluation for.

Request Body

id
optional

name

required, string

description

required, string

model

required, string enum

Possible Enum Values

gpt-4o-mini

gpt-4o

claude-sonnet-3.5

claude-sonnet-3.7

cerebras-llama-3.3-70b

type

required, string enum

Possible Enum Values

score

binary

eval_config
required
POST
/evaluations/:org_id
1
EXAMPLE BODY
{
  "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 Evaluation

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.

Headers

authorization
optional

Path Parameters

org_id

required, string

The ID of the organization to get the evaluation for.

eval_id

required, string

The ID of the evaluation to get.

GET
/evaluations/:org_id/:eval_id
1

Update Evaluation

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.

Headers

authorization
optional

Path Parameters

org_id

required, string

The ID of the organization to update the evaluation for.

eval_id

required, string

The ID of the evaluation to update.

Request Body

id
optional

name

required, string

description

required, string

model

required, string enum

Possible Enum Values

gpt-4o-mini

gpt-4o

claude-sonnet-3.5

claude-sonnet-3.7

cerebras-llama-3.3-70b

type

required, string enum

Possible Enum Values

score

binary

eval_config
required
PUT
/evaluations/:org_id/:eval_id
1
EXAMPLE BODY
{
  "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 Evaluation

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.

Headers

authorization
optional

Path Parameters

org_id

required, string

The ID of the organization to delete the evaluation for.

eval_id

required, string

The ID of the evaluation to delete.

DELETE
/evaluations/:org_id/:eval_id
1

List Format Settings

Headers

authorization
optional

Path Parameters

userid

required, string

User ID

GET
/format-settings/:userid
1

Delete Format Settings

Headers

authorization
optional

Path Parameters

userid

required, string

User ID

Request Body

format_ids

required, array of strings

List of format settings IDs to delete

DELETE
/format-settings/:userid
1
EXAMPLE BODY
{
  "format_ids": [
    "nulla adipisicing"
  ]
}

Create Format Settings

Headers

authorization
optional

Path Parameters

userid

required, string

User ID

POST
/format-settings/:userid
1
EXAMPLE BODY
{
  "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
  }
}

Get Format Settings

Headers

authorization
optional

Path Parameters

userid

required, string

User ID

format_id

required, string

Format Settings ID

GET
/format-settings/:userid/:format_id
1

Update Format Settings

Headers

authorization
optional

Path Parameters

userid

required, string

User ID

format_id

required, string

Format Settings ID

PATCH
/format-settings/:userid/:format_id
1
EXAMPLE BODY
{
  "description": "Updated description",
  "configDisplayName": "Updated 3 lists",
  "isDefault": true
}

Get audit history for an organization

Retrieve audit trail history for an organization with optional filters

Headers

authorization
optional

Query Parameters

table_name
optional

Filter by table name

record_id
optional

Filter by record ID

user_email
optional

Filter by user email

action
optional

Filter by action type (create, update, delete)

start_date
optional

Start date in ISO format (YYYY-MM-DD)

end_date
optional

End date in ISO format (YYYY-MM-DD)

limit

optional, integer, default: 100, maximum value of 1000, minimum value of 1

Maximum number of results

offset

optional, integer, default: 0, minimum value of 0

Starting offset for pagination

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/audit/:orgid/history
1

Get complete history for a specific record

Retrieve complete audit history for a specific record

Headers

authorization
optional

Query Parameters

limit

optional, integer, default: 50, maximum value of 500, minimum value of 1

Maximum number of results

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

table_name

required, string

Table name

record_id

required, string

Record ID

GET
/audit/:orgid/record/:table_name/:record_id
1

Get activity history for a specific user

Retrieve activity history for a specific user in an organization

Headers

authorization
optional

Query Parameters

start_date
optional

Start date in ISO format (YYYY-MM-DD)

end_date
optional

End date in ISO format (YYYY-MM-DD)

limit

optional, integer, default: 100, maximum value of 1000, minimum value of 1

Maximum number of results

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

user_email

required, string

User email

GET
/audit/:orgid/user/:user_email
1

Get available tables for audit filtering

Retrieve list of tables that have audit trail data

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/audit/:orgid/tables
1

Get available actions for audit filtering

Retrieve list of actions that have audit trail data

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/audit/:orgid/actions
1

List agentic search apps

List all agentic search apps for an organization

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

GET
/agentic-search-apps/:orgid
1

Create new agentic search app

Create a new agentic search app for an organization

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

Request Body

app_name

required, string, maximum length of 255

Name of the agentic search app

app_description

required, string

Description of the agentic search app (supports HTML)

primary_color

required, string

Primary color in hex format (e.g., #ff4136)

background_color

required, string

Background color in hex format (e.g., #ccc)

logo_url

required, string

URL or filename for the app logo

POST
/agentic-search-apps/:orgid
1
EXAMPLE BODY
{
  "app_name": "Agento Lookup",
  "app_description": "<b>We can find anything!</b>",
  "primary_color": "#ff4136",
  "background_color": "#cccccc",
  "logo_url": "agento.png"
}

Get agentic search app by ID

Retrieve specific agentic search app for an organization

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the agentic search app to retrieve.

GET
/agentic-search-apps/:orgid/:id
1

Update agentic search app

Update existing agentic search app

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the agentic search app to update.

Request Body

app_name
optional

Name of the agentic search app

app_description
optional

Description of the agentic search app (supports HTML)

primary_color
optional

Primary color in hex format (e.g., #ff4136)

background_color
optional

Background color in hex format (e.g., #ccc)

logo_url
optional

URL or filename for the app logo

PATCH
/agentic-search-apps/:orgid/:id
1
EXAMPLE BODY
{
  "app_name": "Updated App Name",
  "primary_color": "#0074d9"
}

Delete agentic search app

Delete existing agentic search app

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the agentic search app to delete.

DELETE
/agentic-search-apps/:orgid/:id
1

Download agentic search app as JSON

Download the agentic search app configuration as a JSON file

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the agentic search app to download.

GET
/agentic-search-apps/:orgid/:id/download_json
1

Upload logo for agentic search app

Upload a logo image (PNG or JPG) for an agentic search app

Headers

authorization
optional

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the agentic search app to update with logo.

Request Body

file

required, string

Logo image file (PNG or JPG format, max 5MB)

PUT
/agentic-search-apps/:orgid/:id/upload_logo
1

Get logo URL for agentic search app

Generate a temporary URL to access the agentic search app logo in browser

Headers

authorization
optional

Query Parameters

expiration

optional, integer, default: 3600, maximum value of 86400, minimum value of 300

URL expiration time in seconds (default: 1 hour)

Path Parameters

orgid

required, string

The ID of the organization owning the API key.

id

required, string

The ID of the agentic search app.

GET
/agentic-search-apps/:orgid/:id/logo
1

Create a new user account

Register a new user with email and password. Returns a JWT token for immediate authentication.

Request Body

first_name

required, string

User's first name

last_name

required, string

User's last name

email

required, string

User's email address

password

required, string, minimum length of 8

User's password (minimum 8 characters)

mobile
optional

User's mobile number

username

required, string, maximum length of 50, minimum length of 3

Unique username

POST
/signup
1
EXAMPLE BODY
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "[email protected]",
  "password": "securepassword123",
  "mobile": "+1234567890",
  "username": "johndoe"
}

Authenticate user and get access token

Login with email and password to receive a JWT token for API access.

Request Body

email

required, string

User's email address

password

required, string

User's password

POST
/login
1
EXAMPLE BODY
{
  "email": "[email protected]",
  "password": "securepassword123"
}

Get current user profile

Get the profile information of the currently authenticated user. Requires a valid JWT token in the Authorization header.

GET
/me
1

Report the latest API version.

Returns the current API version.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/api-version
1

Fake search

Query Parameters

title

required, string, default: Politico recent news.

User query

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/integration/sources
1

Fake upload sources

Path Parameters

api-version-string

required, string, default: latest

Request Body

source-uuid

required, string

ws-uuid

required, string

project-id

optional, string

Project ID

source-uuid

required, string

ws-uuid

required, string

project-id

optional, string

Project ID

source-uuid

required, string

ws-uuid

required, string

project-id

optional, string

Project ID

source-uuid

required, string

ws-uuid

required, string

project-id

optional, string

Project ID

POST
/api/v1/integration/upload
1
EXAMPLE BODY
{
  "source-uuid": "95ec6225-8c53-da86-bfc0-1e646e1dda77",
  "ws-uuid": "ff11709a-2d69-2944-51b0-d3ad06bb6e3e",
  "project-id": "fe2278b5-25ba-3796-61b8-891033420b25"
}

Fetch the details of the current organization

Fetches the details of the current organization

Query Parameters

organization-id

optional, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/org
1

Update the details of an organization

Updates the details of an organization

Path Parameters

api-version-string

required, string, default: latest

Request Body

name

optional, string

image-url

optional, string

name

optional, string

image-url

optional, string

name

optional, string

image-url

optional, string

name

optional, string

image-url

optional, string
PATCH
/api/v1/org
1
EXAMPLE BODY
{}

Delete an organization (QA environments only)

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.

Query Parameters

organization-id

required, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/org
1

Create a new organization

Creates a new organization for the user

Path Parameters

api-version-string

required, string, default: latest

Request Body

name

required, string

image-url

optional, string

name

required, string

image-url

optional, string

name

required, string

image-url

optional, string

name

required, string

image-url

optional, string
POST
/api/v1/org
1
EXAMPLE BODY
{
  "name": "esse ullamco",
  "image-url": "ex"
}

Fetch all organizations

Fetches all organizations

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/org/all
1

Upload a logo

Allows the user to upload a logo.

Path Parameters

api-version-string

required, string, default: latest

Request Body

file

required
POST
/api/v1/org/logo
1

Fetch all api keys for the organization

Fetches all api keys for the organization

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/org/key
1

Update the name of an api key

Updates the name of an api key

Path Parameters

api-version-string

required, string, default: latest

Request Body

api-key-id

required, string

name

optional, string

domain

optional, string

api-key-id

required, string

name

optional, string

domain

optional, string

api-key-id

required, string

name

optional, string

domain

optional, string

api-key-id

required, string

name

optional, string

domain

optional, string
PATCH
/api/v1/org/key
1
EXAMPLE BODY
{
  "api-key-id": "ebeaf3ef-d8bb-712e-4bd7-1fa55058b56c",
  "name": "dolore Excepteur"
}

Delete an api key by id

Deletes an api key by id

Query Parameters

api-key-id

required, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/org/key
1

Create a new api key for the organization

Creates a new api key for the organization

Path Parameters

api-version-string

required, string, default: latest

Request Body

name

required, string

domain

required, string

name

required, string

domain

required, string

name

required, string

domain

required, string

name

required, string

domain

required, string
POST
/api/v1/org/key
1
EXAMPLE BODY
{
  "name": "ullamco do mollit id",
  "domain": "do nostrud fugiat ut ipsum"
}

Fetch all models for the organization

Fetches all models for the organization

Query Parameters

organization-id

optional, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/org/models
1

Upsert the primary and seconday model for an organization

Upsert the primary and seconday model for an organization

Path Parameters

api-version-string

required, string, default: latest

Request Body

organization-id

optional, string

primary-model

required, string

secondary-model

required, string

organization-id

optional, string

primary-model

required, string

secondary-model

required, string

organization-id

optional, string

primary-model

required, string

secondary-model

required, string

organization-id

optional, string

primary-model

required, string

secondary-model

required, string
POST
/api/v1/org/models
1
EXAMPLE BODY
{
  "organization-id": "7d5abfab-414d-f461-e181-15a41d5a328e",
  "primary-model": "non laborum",
  "secondary-model": "aute amet"
}

Fetch all models available for the organization

Fetches all models for the organization

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/org/models/list
1

Fetch all members of the organization

Fetches all members of the organization

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/org/member
1

Update organization member role

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

Path Parameters

api-version-string

required, string, default: latest

Request Body

target-user-id

required, string

role

required, string

target-user-id

required, string

role

required, string

target-user-id

required, string

role

required, string

target-user-id

required, string

role

required, string
PATCH
/api/v1/org/member
1
EXAMPLE BODY
{
  "target-user-id": "deb42ee7-3e2c-1386-2ef5-dca73a91114c",
  "role": "anim eiusmod deserunt ipsum enim"
}

Remove a member from the organization

Removes a member from the organization

Query Parameters

member-id

required, string

org-id

optional, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/org/member
1

Add a member to the organization

Adds a member to the organization

Path Parameters

api-version-string

required, string, default: latest

Request Body

member-id

required, string

role

optional, string

member-id

required, string

role

optional, string

member-id

required, string

role

optional, string

member-id

required, string

role

optional, string
POST
/api/v1/org/member
1
EXAMPLE BODY
{
  "member-id": "880ae701-3432-0dbe-3a58-e3903ce4f96a"
}

Fetch all members of the organization

Fetches all members of the organization

Query Parameters

organization-id

required, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/org/member/list
1

Invite a member to the organization

Invites a member to the organization

Path Parameters

api-version-string

required, string, default: latest

Request Body

organization-id

optional, string

email

required, string

origin

optional, string

role

optional, string

organization-id

optional, string

email

required, string

origin

optional, string

role

optional, string

organization-id

optional, string

email

required, string

origin

optional, string

role

optional, string

organization-id

optional, string

email

required, string

origin

optional, string

role

optional, string
POST
/api/v1/org/member/invite
1
EXAMPLE BODY
{
  "email": "dolor pariatur tempor Lorem eiusmod",
  "origin": "ut eiusmod"
}

Validate an invite code

Validates an invite code

Path Parameters

api-version-string

required, string, default: latest

Request Body

email

required, string

code

required, string

email

required, string

code

required, string

email

required, string

code

required, string

email

required, string

code

required, string
POST
/api/v1/org/member/invite/validate
1
EXAMPLE BODY
{
  "email": "dolore proident mollit",
  "code": "sed voluptate minim velit dolore"
}

Get all guardrail config by org

Retrieves all guardrail configurations for the organization.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/configs/guardrails
1

Update a specific guardrail config

Updates a guardrail configuration using the provided ID.

Path Parameters

api-version-string

required, string, default: latest

Request Body

id

required, string

name

optional, string, default: Guardrail

Name

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

examples

optional, string, default: Guardrail examples

Examples

id

required, string

name

optional, string, default: Guardrail

Name

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

examples

optional, string, default: Guardrail examples

Examples

id

required, string

name

optional, string, default: Guardrail

Name

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

examples

optional, string, default: Guardrail examples

Examples

id

required, string

name

optional, string, default: Guardrail

Name

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

examples

optional, string, default: Guardrail examples

Examples

PATCH
/api/v1/configs/guardrails
1
EXAMPLE BODY
{
  "id": "f4c5a984-2f5e-638b-d624-2ad50333e107",
  "name": "Guardrail",
  "description": "Guardrail description"
}

Create a new guardrail config

Creates a new guardrail configuration with the provided description, pass criteria, and fail criteria.

Path Parameters

api-version-string

required, string, default: latest

Request Body

name

optional, string, default: Guardrail

Name

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

examples

optional, string

name

optional, string, default: Guardrail

Name

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

examples

optional, string

name

optional, string, default: Guardrail

Name

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

examples

optional, string

name

optional, string, default: Guardrail

Name

active

optional, boolean, default: true

Active

override

optional, boolean, default: true

Active

description

optional, string, default: Guardrail description

Description

pass-criteria

optional, string, default: Guardrail pass criteria

Pass criteria

fail-criteria

optional, string, default: Guardrail fail criteria

Fail criteria

examples

optional, string
POST
/api/v1/configs/guardrails
1
EXAMPLE BODY
{
  "name": "Guardrail",
  "active": true,
  "override": true,
  "description": "Guardrail description",
  "fail-criteria": "Guardrail fail criteria",
  "examples": "nisi incididunt"
}

Check prompt against the guardrails checks.

Checks guardrails for a given user and story.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Story ID

user-query

optional, string, default: User query

User query

skip-override

optional, boolean, default: false

If true we will not check the override guardrails

story-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Story ID

user-query

optional, string, default: User query

User query

skip-override

optional, boolean, default: false

If true we will not check the override guardrails

story-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Story ID

user-query

optional, string, default: User query

User query

skip-override

optional, boolean, default: false

If true we will not check the override guardrails

story-id

optional, string, default: 00000000-0000-0000-0000-000000000000

Story ID

user-query

optional, string, default: User query

User query

skip-override

optional, boolean, default: false

If true we will not check the override guardrails

POST
/api/v1/configs/guardrails/check/prompt
1
EXAMPLE BODY
{
  "story-id": "00000000-0000-0000-0000-000000000000",
  "user-query": "User query"
}

Fetch guardrails failures data

Fetch guardrails failures data

Query Parameters

name

optional, string, default: Nonsense Guardrail

Name of the guardrail check

environment

optional, string, default: production

Environment

limit

optional, integer, default: 10

Max number

offset

optional, integer, default: 0

Offset

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/configs/guardrails/data/failures
1

Fetch the distinct names of the guardrails which have failures

Fetch the distinct names of the guardrails which have failures

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/configs/guardrails/data/names
1

Get a specific guardrail config

Retrieves a guardrail configuration using the provided ID.

Path Parameters

api-version-string

required, string, default: latest

id

required, string
GET
/api/v1/configs/guardrails/:id
1

Delete a specific guardrail config

Deletes a guardrail configuration using the provided ID.

Path Parameters

api-version-string

required, string, default: latest

id

required, string
DELETE
/api/v1/configs/guardrails/:id
1

Generate embeddings for json

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.

Path Parameters

api-version-string

required, string, default: latest

Request Body

filename

required, string

data

required, object

s3-url

required, string

filename

required, string

data

required, object

s3-url

required, string

filename

required, string

data

required, object

s3-url

required, string

filename

required, string

data

required, object

s3-url

required, string
POST
/api/v1/embeddings/vector
1
EXAMPLE BODY
{
  "filename": "elit cupidatat aliquip",
  "data": {},
  "s3-url": "labore sint esse nostrud"
}

Get user by ID

Retrieves a user's information by their unique ID.

Path Parameters

api-version-string

required, string, default: latest

id

required, string
GET
/api/v1/user/users/:id
1

Delete user by ID

Deletes a user's profile by their unique ID.

Path Parameters

api-version-string

required, string, default: latest

id

required, string
DELETE
/api/v1/user/users/:id
1

Sign out

Signs out the current user.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/sign-out
1

Get user by token

Retrieves a user's information by their session token.

Path Parameters

api-version-string

required, string, default: latest

Request Body

token

required, string

token

required, string

token

required, string

token

required, string
POST
/api/v1/user/token
1
EXAMPLE BODY
{
  "token": "qui Duis"
}

Get current user's authentication token

Returns the authentication token for the currently logged-in user.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/current-token
1

Authorize user access to a resource

Validates if the user has access to a resource using JWT token.

Path Parameters

api-version-string

required, string, default: latest

Request Body

token

required, string

orgid

required, string

resource-type

required, string

token

required, string

orgid

required, string

resource-type

required, string

token

required, string

orgid

required, string

resource-type

required, string

token

required, string

orgid

required, string

resource-type

required, string
POST
/api/v1/user/authorize-resource
1
EXAMPLE BODY
{
  "token": "exercitation magna dolor commodo",
  "orgid": "tempor",
  "resource-type": "voluptate ex incididunt Excepteur adipisicing"
}

Authorize user admin access

Validates if the user has admin privileges using JWT token.

Path Parameters

api-version-string

required, string, default: latest

Request Body

token

required, string

token

required, string

token

required, string

token

required, string
POST
/api/v1/user/authorize-admin
1
EXAMPLE BODY
{
  "token": "in elit consequat"
}

Retrieve current org

Retrieves the details of the currently authenticated user.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/current-org
1

Retrieve current user

Retrieves the details of the currently authenticated user.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/current-user
1

Authenticate current user with auth code

Authenticates the current user using an authorization code.

Path Parameters

api-version-string

required, string, default: latest

Request Body

referred-by

optional, string

code

required, string

referred-by

optional, string

code

required, string

referred-by

optional, string

code

required, string

referred-by

optional, string

code

required, string
POST
/api/v1/user/current-user
1
EXAMPLE BODY
{
  "referred-by": "fugiat",
  "code": "nisi qui"
}

Submit user feedback and receive credits

Saves user feedback and grants credits to the user's account in exchange. This feedback can help improve the story or system performance.

Path Parameters

api-version-string

required, string, default: latest

Request Body

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

feedback

required, object, default: {}

User feedback

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

feedback

required, object, default: {}

User feedback

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

feedback

required, object, default: {}

User feedback

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

feedback

required, object, default: {}

User feedback

POST
/api/v1/user/feedback
1
EXAMPLE BODY
{
  "user-id": "00000000-0000-0000-0000-000000000000",
  "feedback": {}
}

Verify if the story has been rated by its author

Checks whether the author has already rated their story with a thumbs up or thumbs down.

Query Parameters

story-id

required, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/feedback/thumbs
1

Record thumbs up/down feedback for a story

Saves a thumbs up or down rating for a story, indicating whether the author liked or disliked it.

Path Parameters

api-version-string

required, string, default: latest

Request Body

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

liked

required, boolean, default: false

User liked the story

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

liked

required, boolean, default: false

User liked the story

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

liked

required, boolean, default: false

User liked the story

story-id

required, string, default: 00000000-0000-0000-0000-000000000000

Story ID

liked

required, boolean, default: false

User liked the story

POST
/api/v1/user/feedback/thumbs
1
EXAMPLE BODY
{
  "story-id": "00000000-0000-0000-0000-000000000000",
  "liked": false
}

Fetch available story plan schemas

Retrieves the list of available story plan schemas that define customizable options, such as length, tone, and audience, for story creation.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/storyplan-config/schemas
1

Generate title and description with AI

Uses an AI model to generate a suggested title and description based on provided settings, including audience, creativity level, and reading level.

Path Parameters

api-version-string

required, string, default: latest

Request Body

audience

optional, string

creativity

optional, string

custom-instructions

optional, string

length

optional, string

output-language

optional, string

personality

optional, string

reading-level

optional, string

report-type

optional, string

title-style

optional, string

audience

optional, string

creativity

optional, string

custom-instructions

optional, string

length

optional, string

output-language

optional, string

personality

optional, string

reading-level

optional, string

report-type

optional, string

title-style

optional, string

audience

optional, string

creativity

optional, string

custom-instructions

optional, string

length

optional, string

output-language

optional, string

personality

optional, string

reading-level

optional, string

report-type

optional, string

title-style

optional, string

audience

optional, string

creativity

optional, string

custom-instructions

optional, string

length

optional, string

output-language

optional, string

personality

optional, string

reading-level

optional, string

report-type

optional, string

title-style

optional, string
POST
/api/v1/user/storyplan-config/gen-mode-data
1
EXAMPLE BODY
{
  "length": "reprehenderit Excepteur",
  "output-language": "fugiat",
  "reading-level": "sint eu qui"
}

Retrieve user's default story configurations

Fetches the default story configuration set by the user for streamlined story creation.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/user/storyplan-config/default
1

Set a default story configuration for the user

Allows the user to set a specific story configuration as the default for future story creation.

Path Parameters

api-version-string

required, string, default: latest

Request Body

id

required, string

id

required, string

id

required, string

id

required, string
POST
/api/v1/user/storyplan-config/default
1
EXAMPLE BODY
{
  "id": "a2a08688-7e47-cb3a-386f-4fc7bde1a9d8"
}

Create or update a story configuration by name

Creates a new story configuration or updates an existing one, using the provided configuration name to identify it.

Path Parameters

api-version-string

required, string, default: latest

Request Body

id

required, string

description

optional, string

config-name

optional, string

config-display-name

optional, string

storyplan

optional, object

id

required, string

description

optional, string

config-name

optional, string

config-display-name

optional, string

storyplan

optional, object

id

required, string

description

optional, string

config-name

optional, string

config-display-name

optional, string

storyplan

optional, object

id

required, string

description

optional, string

config-name

optional, string

config-display-name

optional, string

storyplan

optional, object
POST
/api/v1/user/storyplan-config/upsert-by-name
1
EXAMPLE BODY
{
  "id": "46322cef-83b3-5039-c71d-e2c3ce4fab03"
}

home

GET
/
1

/info

GET
/info
1

Report the latest API version

Path Parameters

api-version-string

required
GET
/api-version
1

Search for stories and users that match a specific value. Stories are searched on headline + lead-in. Sort-by, limit, and descending are all optional (default: limit 30, most recent first).

Query Parameters

search-value

required

limit

optional

sort-by

optional

descending

optional

Path Parameters

api-version-string

required
GET
/stories/search
1

/api/v1/invoke-step-function

Path Parameters

api-version-string

required, string, default: latest

Request Body

arn

required, string

query

required, string

arn

required, string

query

required, string

arn

required, string

query

required, string

arn

required, string

query

required, string
POST
/api/v1/invoke-step-function
1
EXAMPLE BODY
{
  "arn": "ut mollit ea aute adipisicing",
  "query": "reprehenderit Excepteur tempor cillum"
}

Retrieve generated prompts for the homepage

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.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/prompts
1

Get all API example prompts

Fetches a list of all API example prompts.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/api_example_prompts
1

Get all API prompts

Fetches a list of all API prompts.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/api_prompts
1

Initiate Twitter OAuth authentication

Generates the OAuth URI to begin the authentication process with Twitter, allowing users to authorize the app.

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/x/v1/oauth
1

Handle Twitter OAuth callback

Processes the callback from Twitter OAuth after the user has authorized the app. Requires the OAuth token and verifier to complete the authentication.

Path Parameters

api-version-string

required, string, default: latest

Request Body

oauth-token

required, string

oauth-verifier

required, string

oauth-token

required, string

oauth-verifier

required, string

oauth-token

required, string

oauth-verifier

required, string

oauth-token

required, string

oauth-verifier

required, string
POST
/api/v1/x/v1/callback
1
EXAMPLE BODY
{
  "oauth-token": "quis cillum et sit",
  "oauth-verifier": "reprehenderit dolore in mollit"
}

Post a tweet with media

Publishes a tweet containing media, such as images. Requires tweet text and media content for successful posting.

Path Parameters

api-version-string

required, string, default: latest

Request Body

text

required, string

media

required

text

required, string

media

required

text

required, string

media

required

text

required, string

media

required
POST
/api/v1/x/media
1
EXAMPLE BODY
{
  "text": "proident ex occaecat id nisi",
  "media": {}
}

Get all changelogs

Retrieves all changelogs

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/changelogs
1

Update a specific changelog

Updates a changelog using the provided ID.

Path Parameters

api-version-string

required, string, default: latest

Request Body

id

required, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

id

required, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

id

required, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

id

required, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

PATCH
/api/v1/changelogs
1
EXAMPLE BODY
{
  "id": "00000000-0000-0000-0000-000000000000",
  "release-version": "0.0.0",
  "cg-status": "active",
  "release-notes": []
}

Delete a specific changelog

Deletes a changelog using the provided ID.

Query Parameters

id

required, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/changelogs
1

Create a new changelog

Creates a new changelog with the provided release version, CG status, and release notes.

Path Parameters

api-version-string

required, string, default: latest

Request Body

id

optional, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

id

optional, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

id

optional, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

id

optional, string, default: 00000000-0000-0000-0000-000000000000

Changelog ID

release-version

required, string, default: 0.0.0

Release Version

cg-status

required, string, default: active

CG Status

release-notes

required, array of strings, default: []

Release Notes

POST
/api/v1/changelogs
1
EXAMPLE BODY
{
  "id": "00000000-0000-0000-0000-000000000000",
  "release-version": "0.0.0",
  "cg-status": "active",
  "release-notes": []
}

Retrieve all visible notifications for a user

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.

Query Parameters

user-id

required, string

Path Parameters

api-version-string

required, string, default: latest
GET
/api/v1/notification
1

Soft delete a notification

Marks a notification as hidden, making it invisible to the user without permanently deleting it from the database. Identified by notification ID.

Query Parameters

id

required, string

Path Parameters

api-version-string

required, string, default: latest
DELETE
/api/v1/notification
1

Create a new notification

Creates a new notification for a user, associating it with an optional story ID or liker user ID. Allows specifying timestamps and custom messages.

Path Parameters

api-version-string

required, string, default: latest

Request Body

id

required, string

user-id

required, string

story-id

required, string

message

required, string
liker-user-id
optional

created-at

optional, string

updated-at

optional, string

id

required, string

user-id

required, string

story-id

required, string

message

required, string
liker-user-id
optional

created-at

optional, string

updated-at

optional, string

id

required, string

user-id

required, string

story-id

required, string

message

required, string
liker-user-id
optional

created-at

optional, string

updated-at

optional, string

id

required, string

user-id

required, string

story-id

required, string

message

required, string
liker-user-id
optional

created-at

optional, string

updated-at

optional, string
POST
/api/v1/notification
1
EXAMPLE BODY
{
  "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"
}

Apply credits to a user's account with a promo code

Adds credits to the specified user account by validating and applying a promo code.

Path Parameters

api-version-string

required, string, default: latest

Request Body

promo-code

required, string, default: PROMO123

Promo code

promo-code

required, string, default: PROMO123

Promo code

promo-code

required, string, default: PROMO123

Promo code

promo-code

required, string, default: PROMO123

Promo code

POST
/api/v1/user/boost
1
EXAMPLE BODY
{
  "promo-code": "PROMO123"
}

Directly add credits to a user's account

Manually credits the user's account based on provided user ID and credit amount. Additional notes can be included for record-keeping.

Path Parameters

api-version-string

required, string, default: latest

Request Body

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

credits

required, integer, default: 100

Credits

notes

required, string, default: Credits added for testing

Notes

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

credits

required, integer, default: 100

Credits

notes

required, string, default: Credits added for testing

Notes

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

credits

required, integer, default: 100

Credits

notes

required, string, default: Credits added for testing

Notes

user-id

required, string, default: 00000000-0000-0000-0000-000000000000

User ID

credits

required, integer, default: 100

Credits

notes

required, string, default: Credits added for testing

Notes

POST
/api/v1/user/credits
1
EXAMPLE BODY
{
  "user-id": "00000000-0000-0000-0000-000000000000",
  "credits": 100,
  "notes": "Credits added for testing"
}
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key
Protected by API Key