Exogram Docs

API Documentation

Welcome to the Exogram API. Our API allows you to programmatically verify facts, govern agent tool executions in 0.07ms, and generate tamper-proof audit trails. Designed around simple REST principles, standard HTTP status codes, and multi-language SDKs.

Base URLhttps://api.exogram.ai/v1

Authentication

Authenticate your requests using an API Key. You can manage your keys in the dashboard. Pass the key in the Authorization header.

bash
Authorization: Bearer sk_exo_...

API Keys

Programmatically manage your API keys. Useful for rotating credentials or creating temporary access keys.

GET/api-keys

List API Keys

Retrieve a list of your active API keys.

Response

json
{
  "data": [
    {
      "id": "key_123...",
      "name": "Production App",
      "prefix": "sk_exo_...",
      "created_at": "2024-02-10T12:00:00Z"
    }
  ]
}

Example Request

bash
curl -X GET https://api.exogram.ai/api-keys \
  -H "Authorization: Bearer YOUR_TOKEN"
POST/api-keys

Create API Key

Create a new API key. The secret key is only returned once.

Parameters

namestringFriendly name for the keyRequired

Response

json
{
  "id": "key_123...",
  "name": "Production App",
  "key": "sk_exo_secret_key_...",
  "created_at": "2024-02-10T12:00:00Z"
}

Example Request

bash
curl -X POST https://api.exogram.ai/api-keys \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "My App"}'

Ledger Operations

POST/ledger/propose_state

Propose State

Submit a new fact or state change to the ledger for verification.

Parameters

claimstringThe factual claim to verifyRequired
sourcestringSource context or URLRequired
confidencefloat0.0 to 1.0 confidence score

Response

json
{
  "status": "pending",
  "transaction_id": "tx_abc...",
  "estimated_verification_time": "2s"
}

Example Request

bash
curl -X POST https://api.exogram.ai/ledger/propose_state \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"claim": "Sky is blue", "source": "observation"}'

Billing & Usage

Track costs, manage payment methods, and monitor usage limits. Exogram uses a credit-based system for high-volume API access.

GET/billing/usage/current

Get Current Usage

Retrieve usage summary for the current billing period.

Response

json
{
  "billing_period": "2024-02-01",
  "total_api_calls": 1500,
  "total_cost_usd": 15.00,
  "free_tier_used": false,
  "paid": true
}

Example Request

bash
curl -X GET https://api.exogram.ai/billing/usage/current \
  -H "Authorization: Bearer YOUR_TOKEN"
POST/billing/portal

Create Customer Portal

Generate a link to the Stripe Customer Portal for managing subscriptions and payment methods.

Response

json
{
  "url": "https://billing.stripe.com/p/session/..."
}

Example Request

bash
curl -X POST https://api.exogram.ai/billing/portal \
  -H "Authorization: Bearer YOUR_TOKEN"

Errors

CodeDescription
400Bad Request. Check your parameters.
401Unauthorized. Check your API key.
429Too Many Requests. You hit your rate limit.
500Internal Server Error. Something went wrong on our end.