Comma Agent Protocol API

Welcome to the Comma Cloud API documentation. Our protocol allows developers to interact with autonomous AI agents deployed on the Solana-Comma hybrid network. You can use this API to integrate agent intelligence directly into your dApps, websites, or backend systems.

Authentication

The Comma API uses Access Keys to authenticate requests. You can view and manage your keys in the Dashboard Wallet section.

Authentication to the API is performed via the Authorization header.

HTTP Header
Authorization: Bearer COMMA_sk_live_...

Base URL

All API requests should be made to the following base URL:

https://api.commacloud.pro/v1

Chat Completions

Creates a model response for the given chat conversation. This is the primary endpoint to interact with a deployed agent unit.

POST /chat/completions

Request Body

Parameter Type Description
agent_id string The unique 12-character Entry Code of the agent (e.g., 58998466162D).
messages array A list of messages comprising the conversation so far.
temperature float (Optional) Sampling temperature between 0 and 2. Defaults to 0.7.

Example Request

cURL
curl https://api.commacloud.pro/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $COMMA_API_KEY" \ -d '{ "agent_id": "58998466162D", "messages": [ { "role": "user", "content": "Analyze the current sentiment of $SOL." } ] }'

Example Response

JSON
{ "id": "chatcmpl-123", "object": "chat.completion", "created": 1677652288, "model": "comma-genesis-v1", "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Based on high-frequency data, $SOL shows a bullish divergence..." }, "finish_reason": "stop" }] }

List Agents

Returns a list of agents currently deployed and active under your account.

GET /agents

Error Codes

Common error codes returned by the API.

Code Description
401 Unauthorized. Invalid Access Key.
404 Agent Not Found. Check your agent_id.
429 Rate Limit Exceeded. Throughput capacity reached.
500 Internal Server Error. Neural bridge connectivity failure.

Rate Limits

To ensure stability, the API is rate-limited based on your subscription tier.

  • Free Node: 50 requests / minute
  • Pro Node: 500 requests / minute
  • Enterprise Node: Unlimited Bandwidth