API Documentation

Everything you need to integrate AmpGate into your AI agent infrastructure.

Base URL

https://api.ampgate.tech

Authentication

Include your API key in every request using the X-API-Key header:

curl -X POST https://api.ampgate.tech/v1/agents \
  -H "X-API-Key: ag_live_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent", "owner": "me@co.com"}'

Get your API key from Dashboard → API Keys. Keys start with ag_live_sk_

Quick Start (Python)

quickstart.py
from ampgate_sdk import AmpGate

# Initialize client
gate = AmpGate(
    api_key="ag_live_sk_your_key",
    base_url="https://api.ampgate.tech"
)

# 1. Register an agent
agent = gate.agents.create(
    name="order-processor",
    owner="alex@company.com",
    model_provider="openai",
    model_name="gpt-4o",
    capabilities=["orders.read", "orders.create"]
)
print(agent.id)              # ag_Xk9mN3pQ7r...
print(agent.private_key_pem)  # Save this!

# 2. Issue a task-scoped token
token = gate.tokens.create(
    agent_id=agent.id,
    scope=["orders.create"],
    task_description="Create order #1847",
    constraints={"max_order_usd": 200},
    ttl=120  # 2 minutes
)

# 3. Verify a token (any service can do this)
result = gate.tokens.verify(token.token)
if result.valid:
    print(result.agent_name)    # order-processor
    print(result.scope)         # ["orders.create"]
    print(result.remaining_ttl) # 118

API Endpoints

Method Endpoint Description Auth
POST /v1/agents Register a new agent API Key
GET /v1/agents List agents API Key
GET /v1/agents/{id} Get agent details API Key
PATCH /v1/agents/{id} Update agent API Key
DELETE /v1/agents/{id} Revoke agent API Key
POST /v1/tokens Issue task-scoped token API Key
POST /v1/tokens/verify Verify a token None
POST /v1/tokens/{id}/revoke Revoke a token API Key
GET /v1/tokens List tokens API Key
POST /v1/policies Create policy API Key
GET /v1/policies List policies API Key
DELETE /v1/policies/{id} Deactivate policy API Key
POST /v1/delegations Create delegation API Key
POST /v1/delegations/verify Verify delegation None
GET /v1/delegations List delegations API Key
GET /v1/audit Query audit logs API Key
GET /v1/audit/stats Audit statistics API Key
GET /v1/billing/plans List pricing plans API Key
POST /v1/billing/checkout Start upgrade checkout API Key
GET /health Health check None
GET /.well-known/jwks.json Platform public key None

Interactive API Explorer

Try the API directly in your browser. The explorer shows developer endpoints only — no admin or internal routes.

Click "Authorize" in the top right and enter your API key to test authenticated endpoints.

Open API Explorer →