Clara-Backend
    Clara-Backend
    • Get Started
    • Quickstart (Rest API)
    • Quickstart (MCP Server)
    • Auth
      • Register
        POST
      • Google OAuth
        POST
      • Login
        POST
      • Logout
        DELETE
      • Change Password
        PATCH
      • Send OTP
        POST
      • Activate
        POST
      • Enable 2FA
        POST
      • Disable 2FA
        DELETE
    • User
      • View
        GET
      • Update
        PATCH
    • API Key
      • View
        GET
      • Reset
        POST
    • Transaction
      • View All
        GET
      • View
        GET
    • Task
      • View All
        GET
      • View
        GET
    • Agent
      • Supported Attachments
        GET
      • Analysis
        POST
    • Stripe
      • Rate
        GET
      • Portal
        POST
      • Buy
        POST
    • Misc
      • Health
      • Version

    Quickstart (Rest API)

    2.1 Authorization#

    The Clara API supports several authentication methods. Basic Auth (email and password) is only used to generate a User Token. Once you have the User Token, you should use it as a Bearer token for all user-level requests.
    You can authenticate using:
    • a Basic Auth
    • a User Token (generated via Basic Auth),
    • an API Key Token, or
    • a Public API Key.
    Each endpoint specifies which auth methods it accepts, and you must include the correct one in the Authorization header.
    Just paste your API key into the header as:
    HeaderValueTypeRole
    AuthorizationBasic BASE64(email:password)Basic AuthUser
    AuthorizationBearer USER_TOKENBearer TokenUser
    AuthorizationBearer API_KEY_TOKENBearer TokenAPI key
    AuthorizationPUBLIC_API_KEYAPI KeyPublic
    Once that’s set, you’re ready to make authenticated requests to any Clara endpoint.

    2.2 Sample Flow#

    Once you have your API key, user id and you’ve added credits to your account, here’s how the agents work. Let’s use the Transaction Analysis agent as an example.
    Send a request to the Transaction Analysis endpoint with a transaction hash. You’ll receive a task id in the response. This simply means the agent has started working on your request.
    Sample Input:
    {
        "transaction_hash": "0xf9912950c900625a8cfe27ffdeee791436fab281e1c07daea83b59fe655efc97"
    }
    
    Sample Output:
    {
        "data": {
            "created_at": "Fri, 21 Nov 2025 19:02:01 GMT",
            "id": "task_d2b44690a75e49d2a3b3afada39017d9",
            "result": null,
            "status": "RUNNING",
            "updated_at": "Fri, 21 Nov 2025 19:02:01 GMT",
            "user_id": "user_08e2be305d7f44cb95cbf4b16da0feab"
        },
        "message": "Transaction analysis task created successfully.",
        "status": "success"
    }
    
    Check the status of the task using the View Task endpoint. When the agent finishes processing, the task will show a “COMPLETED” status along with the final results.
    Sample Output:
    {
        "data": {
            "created_at": "Sat, 22 Nov 2025 07:46:17 GMT",
            "id": "task_7bd7b7ebdfa04c11871bf0c477f336d2",
            "result": {
                "basic": {
                    "fee_native": 3.86857684117e-7,
                    "from": "0x1E8E93CB91778E5B1a3639706789195a838960F8",
                    "method": "transfer(address,uint256)",
                    "status": "success",
                    "timestamp": "2025-11-21T18:08:11Z",
                    "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                    "value_native": 0
                },
                "error": null,
                "success": true,
                "summary": {
                    "risk_notes": [],
                    "short_description": "0x1E8E93CB91778E5B... transferred 6.00135 USDC (contract 0x833589fcd6ed...) to 0x376A42916C261ecA96E3c70F8e5fac03BaA54b35.",
                    "type": "transfer"
                },
                "token_transfers": [
                    {
                        "amount": "6.00135",
                        "contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
                        "from": "0x1E8E93CB91778E5B1a3639706789195a838960F8",
                        "to": "0x376A42916C261ecA96E3c70F8e5fac03BaA54b35",
                        "token_name": "Circle: USDC Token",
                        "token_symbol": "USDC"
                    }
                ],
                "tx_hash": "0xf9912950c900625a8cfe27ffdeee791436fab281e1c07daea83b59fe655efc97"
            },
            "status": "COMPLETED",
            "updated_at": "Sat, 22 Nov 2025 07:46:17 GMT",
            "user_id": "user_c07217f269d14a438960dcddc528e57d"
        },
        "message": "Task fetched successfully.",
        "status": "success"
    }
    
    This flow is the same for all Analytiq agents - send a request, get a task ID, then fetch the output once it’s ready.

    2.3 Rate Limits#

    API rate limits apply per API key. Clara allows up to 10 requests per second.
    If you go over this limit, or exceed your plan’s usage limits, the API will return an HTTP 429 - Too Many Requests response.
    Keeping your usage within the limit ensures smooth and reliable performance for everyone.
    Modified at 2025-11-27 22:57:07
    Previous
    Get Started
    Next
    Quickstart (MCP Server)
    Built with