Developer overview
Everything you can do in the FYAI web app is backed by a set of REST APIs. You can call the same APIs from your own code, scripts, CI pipelines and AI coding tools. This section covers how.
Ways to work with FYAI programmatically
| You want to… | Use | Page |
|---|---|---|
| Call FYAI from a script, backend service or CI job | The REST APIs with an API key | Platform API, Common API tasks |
| Get a credential for code | An API key from Settings → API Keys | Authentication |
| Let an AI assistant (Claude Code, Claude Desktop, VS Code Copilot) manage and run your FYAI agents, workflows and knowledge | The FYAI platform MCP server | Platform MCP server, MCP tool reference |
| Hand a task or workflow run from Claude Code to an FYAI agent and get told when it finishes | The delegation tools in the platform MCP server | Delegating from Claude Code |
| React live to changes in your project (an agent was edited, a workflow was created) | The events WebSocket | Platform API |
| Start a workflow when something happens in another system | An inbound webhook | Webhooks, Triggering workflows with webhooks |
| Tell agents which GitHub repositories they work on | The FYAI GitHub App and Settings → Repositories | GitHub repositories |
| Give your agents tools from external MCP servers, or expose tools through a governed endpoint | The MCP Gateway | MCP Gateway |
The public API hosts
FYAI is split into services. Each has its own host, and each owns a different part of the platform:
| Service | Base URL | What it owns |
|---|---|---|
| Agent | https://agent.fyai.co.nz | Agents, teams, LLM configs (models), functions, chat sessions, running agents, executing workflows, test cases, observability, usage, promotions |
| Catalog | https://catalog.fyai.co.nz | Workflow definitions, missions, programs, knowledge bases and documents, agent memory, data sources, dashboards, elements, manifests, execution environments, webhooks, workflow schedules, repositories |
| Integration | https://integration.fyai.co.nz | Integrations, integration secrets, access grants and sharing, integration templates |
| Auth | https://auth.fyai.co.nz | API keys, organisations, projects, users and roles |
The web app itself is at https://fyai.co.nz. The full breakdown, conventions and error codes are in Platform API.
Quick start
-
In the web app, open Settings. Under My account, select API Keys.
-
Select Create Key, give it a Key Name, choose an Expiry and Access level, then select Create.
-
Copy the key from the API Key Created dialog. It starts with
fyai_and you can't see it again. -
Call any API with the key in the
X-API-Keyheader:curl -H "X-API-Key: $FYAI_API_KEY" https://agent.fyai.co.nz/agentsThis returns the agents in the project the key belongs to.
From there, Common API tasks walks through creating and running an agent, starting a workflow and ingesting documents.
Things to know up front
- Everything is scoped to one project. A credential always acts inside one organisation and one project, and every list, create and run happens there. You never pass a tenant or project ID in a request. See Authentication.
- Access follows project roles. An API key carries one of four access levels (Run, Read, Write, Admin), which map to the project roles described in Members and roles.
- Long-running work is asynchronous. Agent runs, workflow runs and document ingestion can take minutes. Use the asynchronous endpoints and poll, rather than holding a request open. See Platform API.
- There's no public OpenAPI explorer. The
/docsand/openapi.jsonpaths aren't exposed on the public hosts. This section and the MCP tool reference document the endpoints customers use.