Capitol AI allows you to use our embedded components to create AI-generated content. You can easily embed these components using our NPM package:
Capitol AI components will make requests to your APIs, and your APIs can catch all requests and forward them to our APIs. This allows you to intercept API requests and capture data on your end before passing it on.
All requests to our servers should include the following headers:
x-api-key
x-domain
x-user-id
x-user-id
With the x-user-id
header, you can introduce the concept of user documents. Using our search APIs, users can view their documents. On the server-side, you can pass the current user ID in this header to leverage our ACL system, or opt to use a uniform user-id
for all requests.
For inspiration on how to implement this, check out our example project on GitHub: