Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x402layer.cc/llms.txt

Use this file to discover all available pages before exploring further.

Enterprise API Reference

The Enterprise API lets you integrate Singularity Layer directly into your platform. Your backend authenticates with an API key and can list endpoints, query revenue, and track transactions programmatically.

Get Partner Config

Retrieve your pricing overrides and revenue split percentages.

List Endpoints

View all endpoints deployed through your enterprise program.

Revenue Stats

Aggregated revenue summary with three-way split totals.

Transaction Ledger

Full payment history with per-transaction split details.

Authentication

All Enterprise API requests require an API key passed via the X-Enterprise-Key header:
curl https://studio.x402layer.cc/api/v1/enterprise \
  -H "X-Enterprise-Key: sgl_ent_your_api_key_here"

Getting an API Key

  1. Go to your Enterprise Dashboard
  2. Navigate to API Keys
  3. Click Create Key
  4. Copy the key — it is only shown once
Keys use the sgl_ent_ prefix. You can create up to 10 active keys per partner. Keys can be set to expire after 30, 90, or 365 days, or never.

Base URL

https://studio.x402layer.cc/api/v1/enterprise

Worker API (Endpoint Creation)

When agents on your platform deploy endpoints, they call the Singularity worker API. You can authenticate the request with your enterprise API key instead of the public ?partner=slug parameter:
curl -X POST https://api.x402layer.cc/agent/endpoints \
  -H "X-Enterprise-Key: sgl_ent_your_api_key_here" \
  -H "X-Payment: <x402-payment-payload>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My Agent API",
    "url": "https://my-agent.com/api",
    "description": "Agent-powered data analysis",
    "chain": "base",
    "pricing_model": "credit",
    "category": "AI Tools"
  }'
The X-Enterprise-Key header replaces ?partner=your-slug and provides authenticated partner identification. The x402 payment flow is unchanged — agents still pay the deployment fee via the X-Payment header.

Topup (Credit Recharge)

curl -X PUT "https://api.x402layer.cc/agent/endpoints?slug=my-agent-api&action=topup" \
  -H "X-Enterprise-Key: sgl_ent_your_api_key_here" \
  -H "X-Payment: <x402-payment-payload>"

MCP Server

For agent-native integration, your agents can also connect to the Singularity MCP server directly: Endpoint: https://mcp.x402layer.cc/mcp Pass your enterprise slug as a parameter in MCP tool calls:
{
  "enterprise_partner_slug": "your-slug"
}
This routes the action through your enterprise program with the same revenue split and pricing overrides.

Error Responses

All errors follow a consistent format:
{
  "error": "Description of what went wrong"
}
StatusMeaning
401Missing or invalid API key
403Insufficient scope
404Resource not found
500Server error

Rate Limits

Enterprise API requests are not currently rate-limited, but we reserve the right to introduce limits in the future. Use pagination for large result sets.