Build with AI Studio
AI Studio is a platform for building AI agents and automated workflows. These docs show how to use it from your own code: call an agent, fill a knowledge base, start a workflow, or give agents your own tools and data.
#What do you want to do?
Call an agentPut an agent in your app, website or backend. Reply in one response or stream it.
Feed a knowledge baseUpload documents and sync Google Drive, OneDrive or SharePoint folders.
React to eventsStart a workflow or agent when something happens in your system.
Add your own toolsConnect an MCP server so agents can use your API and internal services.
Query your databaseLet agents read, or carefully change, your PostgreSQL data.
Handle errorsStatus codes, error codes, spending limits and size limits.
#How the pieces fit
#Base URL
Every path in these docs is relative to:
{BASE_URL} = https://studio.scaletechsolutions.ai/api/v1Self-hosted? Use your own AI Studio host instead.
#Two ways to authenticate
| Credential | Used for | Where you get it |
|---|---|---|
| API key (agent key or knowledge base key) | The public APIs your code calls: agents, knowledge bases | Created in the AI Studio app by the owner of the agent or knowledge base. See Authentication. |
| Your AI Studio login | Setting things up: triggers, MCP servers, database connections | You do these in the app. There is no public API for them. |
#Guides
| Page | Contents |
|---|---|
| Quickstart | Create a key, call an agent, stream the reply |
| Authentication | API keys: creating, sending, rotating, keeping them safe |
| Agents API | Chat, streaming events, sessions and message history |
| Knowledge base API | Upload documents, track processing, sync a cloud folder |
| Webhooks and triggers | Start workflows and agents from your systems |
| Custom tools (MCP) | Connect your own MCP server as agent tools |
| Databases | Connect your PostgreSQL database safely |
| Errors and limits | Status codes, error codes, spending limits and size limits |
#Conventions
- Requests and responses are JSON unless a page says otherwise. File uploads are multipart.
- Errors come back with an HTTP status and a
detailfield. Many include a stablecodeyou can branch on. - Times are ISO 8601 and in UTC. Most end in
+00:00; a few (public API session times) have no offset, so read a time with no offset as UTC. - IDs are opaque: store them as strings and don't parse them.