Skip to main content
You can go from zero to searching in three API calls. No account, no dashboard, and no human approval required — your agent discovers the service, registers itself, and receives an API key it can use immediately. This guide walks through each step with code examples in curl, Python, and Node.js.
The API key returned by POST /v1/register is shown exactly once and cannot be retrieved again. Store it in a secure location (environment variable, secrets manager, encrypted config) before making any other requests.
1

Discover the service

Call GET /v1/capabilities to read available endpoints, rate limits, and credibility scoring rules. This endpoint requires no authentication and is the recommended first call for any agent integrating with Lithtrix.
curl https://lithtrix.ai/v1/capabilities
The response lists every endpoint, the free-tier rate limit (60 requests/min), and the credibility scoring rules. You can use this payload to drive agent behavior without hardcoding service details.
2

Register your agent

Call POST /v1/register with two fields: an agent_name for your agent and an owner_identifier (your email address or another contact string). The response contains your api_key.agent_name must use only letters, digits, hyphens, and underscores.
curl -X POST https://lithtrix.ai/v1/register \
  -H "Content-Type: application/json" \
  -d '{"agent_name":"my-agent","owner_identifier":"you@example.com"}'
Example response:
{
  "api_key": "ltx_a3f9b2c1d5e7...",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Store this key securely. It cannot be retrieved again."
}
The api_key field is returned only in this response. It cannot be retrieved later. Store it immediately — in an environment variable, a secrets manager, or encrypted configuration — before proceeding.
3

Search the web

Call GET /v1/search with your query in the q parameter and your API key in the Authorization header. Every result includes a credibility_score and your remaining quota in the usage field.
curl "https://lithtrix.ai/v1/search?q=Singapore+climate+policy&num_results=5" \
  -H "Authorization: Bearer ltx_your_key"
Example response:
{
  "query": "Singapore climate policy",
  "cached": false,
  "usage": {
    "calls_total": 1,
    "calls_remaining": 299
  },
  "results": [
    {
      "title": "Singapore Green Plan 2030",
      "url": "https://www.greenplan.gov.sg",
      "snippet": "Singapore's whole-of-nation movement towards a sustainable future.",
      "credibility_score": 1.0
    },
    {
      "title": "Climate Action — National Environment Agency",
      "url": "https://www.nea.gov.sg/our-services/climate-change-energy-efficiency",
      "snippet": "NEA's programmes to reduce Singapore's carbon footprint.",
      "credibility_score": 1.0
    },
    {
      "title": "Singapore pledges net-zero by 2050",
      "url": "https://www.bbc.com/news/world-asia-62345678",
      "snippet": "Singapore has committed to achieving net-zero emissions by 2050.",
      "credibility_score": 0.8
    }
  ]
}

Credibility score reference

Every result carries a credibility_score between 0.5 and 1.0. Use this field to filter results or weight your agent’s reasoning.
ScoreSource type
1.0.gov domains
0.9.edu domains
0.8Major news outlets (BBC, Reuters, AP News, NPR)
0.7.org domains
0.5All other sources
For research or fact-checking tasks, filter to results with credibility_score >= 0.8 to limit your agent to government, academic, and major news sources.

Next steps