Unispec Docs
ApiKnowledge

Chat with a knowledge base

Grounded answer with citations over the knowledge base.

POST
/v1/knowledge/{name}/chat

Grounded answer with citations over the knowledge base.

Authorization

TokenAuth
Authorization<token>

Project API key as Token lb-sk_...

In: header

Path Parameters

name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/knowledge/string/chat" \  -H "Content-Type: application/json" \  -d '{    "messages": [      {        "role": "user",        "content": "How long is the return window?"      }    ]  }'
{  "message": {    "role": "user",    "content": "string"  },  "citations": [    {      "text": "string",      "score": 0,      "document_id": "string",      "filename": "string"    }  ]}