AI and search: your own keys, your own knowledge sources
Forumulate's AI features are bring-your-own-key, per organization. There is no platform AI key: nothing is sent to a model provider on your behalf unless your organization has connected its own account, and the bill for those calls is yours, from your provider. This guide covers the three places that shows up in the API: the embedding provider behind semantic search, the external knowledge sources the assistant may answer from, and the insights report that tells you what readers asked.
Semantic search and the embedding provider
Search ranks results with two arms: keyword matching and vector similarity. The vector arm needs an embedding model. An organization with no key connected falls back to a deterministic offline embedding, so search still works but only loosely understands meaning. Connect a provider to get real semantic results.
Provider |
| Default model | Default dimensions |
|---|---|---|---|
OpenAI |
|
| 1536 |
|
| 768 |
All five routes need the org.manage_integrations capability.
PUT /orgs/{orgId}/search/embedding-provider
{
"provider": "openai",
"apiKey": "sk-...",
"model": "text-embedding-3-small",
"dimensions": 1536
}model and dimensions are optional and default as in the table. The index stores vectors up to 1536 wide, so a model that produces more is refused with a 422 telling you to choose a smaller one. The key is stored encrypted and never read back; the response carries only a keyHint.
Embeddings from different models cannot be compared, so a connect that changes the provider or the model, and a disconnect, re-embed the organization's pages straight away. The response says how many pages that was (reindexed). Community topics are re-embedded by reindex below. Prove a key works before you depend on it:
POST /orgs/{orgId}/search/embedding-provider/testIt answers { "ok": true, "model": "...", "dimensions": 1536 }, or a 422 if no provider is connected, or a 502 if the call to the provider failed or returned no vector.
Method and path | What it does |
|---|---|
| Status: provider, model, |
| Connect or change the provider. |
| Disconnect and return to the offline fallback. |
| One cheap call to check the key. |
| Re-embed pages and community topics: |
Use GET first when someone reports that semantic search does not find a page: indexed is how much of the corpus the vector arm can see. Use reindex after a model change or to repair drift.
Knowledge sources for the assistant
The assistant answers out of your own content. If the answers live somewhere else too, add that as a knowledge source: either a page that is fetched once, or a block of text you paste in. Reading needs org.read; adding or removing needs org.manage_integrations.
POST /orgs/{orgId}/ai/sources
{
"kind": "url",
"title": "Shipping policy",
"url": "https://example.com/shipping",
"spaceId": null
}POST /orgs/{orgId}/ai/sources
{ "kind": "text", "title": "Refund rules", "content": "Refunds are issued within 14 days..." }kindisurlortext. Aurlsource requiresurl, and its text is fetched when you add it, not on every question.titleis 1 to 200 characters. Stored text is capped at 40,000 characters.spaceIdlimits the source to one space; leave it out ornullfor the whole organization.The response is
201 { "id": "..." }.
GET /orgs/{orgId}/ai/sources lists them (id, kind, title, url, spaceId) and DELETE /orgs/{orgId}/ai/sources/{id} removes one.
What readers asked: insights
GET /orgs/{orgId}/ai/insightsNeeds org.read. It tallies up to 5,000 of the organization's assistant questions:
Field | Meaning |
|---|---|
| Questions asked. |
| How many the assistant could and could not answer. |
| Reader feedback on answers. |
| The 15 most repeated questions, with counts. |
| Questions it could not answer: the content to write next. |
| Answers readers marked unhelpful: the content to fix. |
Questions are lower-cased and trimmed before counting, so "How do I reset?" and "how do i reset?" are one entry.
In the API
Every operation below is also reachable from the other surfaces without a dedicated command. forumulate api <Operation> calls it from the CLI, the JavaScript SDK has a typed method for each one (the last column names it; the Python and Go clients are generated from the same spec), and an agent reaches the organization-scoped ones through the MCP call_api tool. Where a CLI command or MCP tool exists too, the last column names it. Operation names link to the API reference.
Ai Org
Operation | Request | What it does | Shortcuts |
|---|---|---|---|
| List insights in an organization |
| |
| Get the usage in an organization |
| |
| List sources in an organization |
| |
| Create a source in an organization |
| |
| Delete the source |
|
Embedding Provider
Operation | Request | What it does | Shortcuts |
|---|---|---|---|
| Get the embedding provider in an organization |
| |
| Replace the embedding provider in an organization |
| |
| Delete the embedding provider in an organization |
| |
| Test the embedding provider |
| |
| Create the reindex in an organization (embedding provider) |
|
Org Lens
Operation | Request | What it does | Shortcuts |
|---|---|---|---|
| Create the ask in an organization |
|
Questions
Operation | Request | What it does | Shortcuts |
|---|---|---|---|
| List questions in a space |
| |
| Create a question in a space |
| |
| List clusters in a space |
| |
| Delete the question |
| |
| Create a draft in a space |
| |
| Create a suggestion in a space |
| |
| List assertions in a space |
| |
| Create an assertion in a space |
| |
| Run the assertion |
| |
| Delete the assertion |
| |
| Get the uncovered in a space |
|
Retrieval
Operation | Request | What it does | Shortcuts |
|---|---|---|---|
| Create the search in an organization |
|
Search
Operation | Request | What it does | Shortcuts |
|---|---|---|---|
| Get the search in a space (docs) |
|
Unified Search
Operation | Request | What it does | Shortcuts |
|---|---|---|---|
| Get the search in an organization |
| |
| List recent search in an organization |
| |
| Get the semantic in an organization |
| |
| Create the reindex in an organization |
| |
| List tags in an organization |
| |
| Get the tag (search) |
| |
| List gaps in an organization |
|