For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get API Key
GuidesAPI Reference
GuidesAPI Reference
  • Overview
    • API Reference
  • Endpoint Reference
    • Organizations
    • Projects
    • Documents
    • Agent
    • Check
  • API Explorer
      • GETExport batch results as CSV
      • GETGet a batch with results
      • GETList Agent batch queries
      • POSTCreate an Agent batch query
      • POSTSingle-shot Q&A over project knowledge
      • POSTChat with the Agent over project knowledge
Get API Key
LogoLogo
API ExplorerAgent

Chat with the Agent over project knowledge

POST
/api/v2/chat
POST
/api/v2/chat
$curl -X POST https://api-staging.pyramid-ai.com/api/v2/chat \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "messages": [
> {
> "role": "user",
> "content": "What fire safety measures are required for this project?"
> }
> ]
>}'
1{
2 "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
3 "success": true,
4 "data": {
5 "chat_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
6 "message": {},
7 "sources": [
8 {}
9 ],
10 "usage": {}
11 },
12 "pagination": {
13 "total": 127,
14 "offset": 0,
15 "limit": 50
16 }
17}

Multi-turn conversational endpoint. Supports both synchronous JSON responses and server-sent event (SSE) streaming via stream: true.

Was this page helpful?
Previous

List requirements for a check run

Next
Built with

Authentication

AuthorizationBearer

Pyramid API key (prefix with “Bearer ”)

Request

This endpoint expects an object.
messageslist of objectsRequired

Conversation history. Include prior messages for multi-turn context.

project_idstringOptionalformat: "uuid"
Which project's documents to search. Required for grounded answers.
chat_idstringOptionalformat: "uuid"
Provide to continue an existing conversation. Omit to start a new one.
chat_typeenumOptional
'project' scopes search to the specified project. 'general' allows broader context.
Allowed values:
modelenumOptional

AI model to use. ‘chat-model-reasoning’ is slower but more thorough.

Allowed values:
streambooleanOptionalDefaults to false

Set to true for Server-Sent Events (SSE) streaming. The response arrives token-by-token.

Response

Chat response (JSON when stream=false, SSE when stream=true)

request_idstringformat: "uuid"

Server-generated per-request UUID. Also sent as X-Request-Id response header. Include in support tickets.

successany
dataobject
paginationobject

Present only on list endpoints. Top-level (not nested inside data).

Errors

400
Bad Request Error
401
Unauthorized Error