Build with AI agents
There are two ways to use AI with Angelcam: have a coding agent such as Claude Code, Cursor or Copilot write code against the API, which is what most of this page is about, or ask an AI assistant about your cameras directly, with no code, through the Angelcam MCP server.
Give your agent the spec
Section titled “Give your agent the spec”Point your agent at the OpenAPI specification:
https://developers.angelcam.com/openapi.yamlIt is OpenAPI 3.0 and covers every endpoint (about 300 KB). An example prompt:
Use the Angelcam API. The spec is at https://developers.angelcam.com/openapi.yaml.Write a script that lists my cameras and prints the ones that are offline.Read the token from the ANGELCAM_TOKEN environment variable.Rules to paste into your agent’s instructions
Section titled “Rules to paste into your agent’s instructions”Agents read the spec but still trip on the same few things. Paste this into CLAUDE.md, AGENTS.md or your .cursor/rules file:
Angelcam API rules- Base URL: https://api.angelcam.com/v1. HTTPS only, JSON.- Every URL ends with a trailing slash: /cameras/123/recording/ (without it you get 404).- Auth header: "Authorization: Bearer <token>" for OAuth2, "Authorization: PersonalAccessToken <token>" for a personal access token.- Personal access tokens are for personal and development use. Integrations use OAuth2.- OAuth2 access tokens expire after 10 hours. Refresh tokens are single-use: store the new one after each refresh.- Rate limit per user account: 30 requests a minute, 1000 an hour. On 429, wait the time named in the "detail" field, then back off exponentially.- Times are UTC, ISO 8601 with the time part: 2026-03-19T13:15:32Z.- Lists page with limit and offset; always set limit (without it a page holds at most 100 items). Event lists use the "next" cursor instead.- A user can belong to several spaces. Send X-Space-Id to work in a space other than the default.- 404 on a recording endpoint can mean Cloud Recording is not active on that camera.- 403 usually means the token lacks the scope the endpoint needs (for example recording_access).- Errors are JSON {title, detail, status}; branch on "title".- Never hard-code a token; read it from an environment variable.Each rule comes from Authentication, API conventions, Error handling and Key concepts; read them for the details.
No code? Use the Angelcam MCP server
Section titled “No code? Use the Angelcam MCP server”The Angelcam MCP server lets Claude, ChatGPT, Cursor and other AI assistants read your cameras, recordings, snapshots and incidents after you sign in with your Angelcam account, with no code and no token handling. The connector address is https://mcp.angelcam.com; a read-only one is https://mcp.angelcam.com/readonly. See mcp.angelcam.com for how to connect it in each assistant.