Introduction

The m8tes API exposes autonomous agents as REST resources. An agent has persistent instructions and tools. A task is what it should do. A run is a single execution that streams results back to you. To embed agents per end user, set user_id on a run and its memory, tools, and history scope to that user.

Base URL: https://api.m8tes.ai/api/v2

The SDK targets this URL by default; override it with the M8TES_BASE_URL env var or M8tes(base_url=...). A custom base URL must include the /api/v2 prefix (e.g. http://localhost:8000/api/v2 for self-hosted); without it every call 404s.

Authentication

All requests require an API key in the Authorization header. API keys use the m8_ prefix. Get yours from the Developer dashboard.

Create or rotate a key with POST /api/v2/token. Rotation invalidates the previous key, so update your stored secret immediately. Key hygiene rules: Going Live.

Resources

The API is organized around these resources:

ResourceDescription
AgentsReusable personas with instructions, tools, and optional email or webhook triggers (iMessage coming soon)
RunsTask executions that stream Server-Sent Events
Audit LogsAccount-scoped API request history and debugging
TasksReusable job definitions with triggers (schedule, webhook, email)
AppsAvailable tools and OAuth integrations
MemoriesEnd-user memory management
PermissionsTool allow-lists for end-users
UsersEnd-user profiles for multi-tenant apps
SettingsAccount-level feature configuration
UsageBilling usage, run counts, and account limits
WebhooksEvent notification subscriptions

Usage

Inspect your plan, usage, and limits with GET /api/v2/usage or client.billing.usage() (client.auth.get_usage() still works). Plans, the prepaid balance, top-ups, and usage breakdowns: Billing & Usage.

Conventions

All list endpoints use cursor-based pagination. All errors follow a standard format. Request rates and field sizes: Limits. Model catalog and ZDR coverage: Models.

Next: Billing & Usage · Errors · Pagination

Was this page helpful?