Skip to main content

Overview

@Endpoint() turns Python functions into serverless API endpoints - like AWS Lambda, but simpler.
Deploy once, invoke anywhere:

What are Endpoints?

Endpoints are serverless API functions that:
  • Respond to HTTP requests (GET, POST, PUT, DELETE)
  • Scale automatically with traffic
  • Return JSON responses
  • Have built-in authentication
  • Support path parameters and query strings
When to use Endpoints vs Agents:

Building Endpoints

Basic Endpoint

Invoke:

Endpoint Parameters

string
required
Unique endpoint identifier (alphanumeric, underscores, hyphens)
string
required
Human-readable name
string
required
What the endpoint does
string
default:"POST"
HTTP method: GET, POST, PUT, DELETE, PATCH
string
Custom URL path (e.g., /users/{id})If not provided, defaults to /endpoints/{id}
boolean
default:"true"
Require API key authentication
int
default:"30"
Max execution time in seconds
int
Max requests per minute

HTTP Methods

GET Endpoint

Fetch data:
Invoke:

POST Endpoint

Create data:
Invoke:

PUT Endpoint

Update data:
Invoke:

DELETE Endpoint

Delete data:
Invoke:

Path Parameters

Use {parameter} in path:
Invoke:

Query Parameters

Accept query strings as function parameters:
Invoke:

Response Format

Return a dict with status and body:
Status codes:
  • 200 - OK
  • 201 - Created
  • 400 - Bad Request
  • 401 - Unauthorized
  • 404 - Not Found
  • 500 - Internal Server Error

Authentication

Require Auth (Default)

By default, endpoints require API key authentication:
Invoke with API key:

Public Endpoint

Disable authentication for public endpoints:
Invoke without auth:

Rate Limiting

Limit requests per minute:

Using Database

Store and query data:

Using Integrations

Call external APIs:

Complete Example: REST API

Deploy:
Use your API:

Best Practices

Follow REST conventions:
  • GET - Fetch data (read-only)
  • POST - Create resources
  • PUT - Update resources (full update)
  • PATCH - Partial update
  • DELETE - Delete resources

Next Steps

Database

Store data persistently

Deploying

Deploy your endpoints

Integrations

Use integrations in endpoints

Actions

Build actions for complex logic