Skip to main content

Authentication

ASG uses API keys for authentication. Create a key in the Console, set it as an environment variable, and include it as a Bearer token in every request.

Quick Setup

  1. Create an API key at agent.asgcompute.com/console → API Keys → Create Key
  2. Set your environment variable:
export ASG_API_KEY="sk-agent-..."
  1. Include in requests:
Authorization: Bearer $ASG_API_KEY

Verify Connectivity

Test with a free tool — no payment required:
curl -s https://agent.asgcompute.com/v1/mcp/tools/call \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ASG_API_KEY" \
  -d '{"tool": "get_status", "arguments": {}}'

Key Security

Never share your API key. Treat sk-agent-* keys like passwords. If compromised, revoke immediately in the Console and create a new key.
PracticeRecommendation
StorageEnvironment variable or secrets manager — never in source code
RotationRotate keys periodically; revoke unused keys
ScopeEach agent/integration should use its own key
MonitoringCheck usage in the Console to detect anomalies

Auth vs. Payment

ASG separates authentication (who you are) from payment (how you pay):
ConcernMechanism
IdentityAPI key via Authorization: Bearer <api_key>
PaymentSolana USDC via 402 quote → on-chain transfer → X-Payment header
Free tools (get_status, echo, sandbox_cancel) require only authentication — no payment step.

MCP-Native Integration

For MCP-compatible agent frameworks, use the JSON-RPC endpoint (/mcp) with the same Bearer header:
curl -s https://agent.asgcompute.com/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ASG_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

Wallet Integration

Your Solana wallet is used for payments only — not for authentication. Compatible wallets:
  • Phantom
  • Solflare
  • Backpack
  • CLI wallets (Solana CLI)