Skip to content

Quickstart ​

Make your first LibertAI call in under five minutes. If you already use OpenAI or Anthropic SDKs, you just change the base URL.

1. Get an API key ​

Sign in to the Developer console, create a key, and top it up. Or skip the key entirely and pay per request in USDC on Base — see x402 payments.

2. Make a call ​

sh
curl -X POST https://api.libertai.io/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LIBERTAI_API_KEY" \
  -d '{
    "model": "gemma-4-31b-it",
    "messages": [
      { "role": "user", "content": "In one sentence: what is decentralized inference?" }
    ]
  }'

That's it. You're talking to an open-source LLM on a decentralized compute network.

Already using OpenAI? ​

Two lines change. Keep the rest of your code.

diff
- base_url="https://api.openai.com/v1"
+ base_url="https://api.libertai.io/v1"
- model="gpt-4o-mini"
+ model="gemma-4-31b-it"

The /v1/chat/completions, /v1/completions, /v1/responses, and /v1/models endpoints are all OpenAI-compatible. /v1/messages is Anthropic-compatible.

Already using Anthropic? ​

diff
- base_url="https://api.anthropic.com"
+ base_url="https://api.libertai.io"
- model="claude-haiku-4-5"
+ model="gemma-4-31b-it"

The /v1/messages endpoint accepts the Anthropic Messages format directly.

Next steps ​

  • Use LibertAI in your tools — Cline, Roo Code, Continue, OpenCode, Aider, Claude Code, LangChain
  • Text API — list of models, pricing, context windows, capabilities
  • Text usage — streaming, function calling, vision, direct CRN calls
  • Image generation — Stable Diffusion and OpenAI-compatible endpoints
  • Web search — multi-engine search and URL fetching for RAG
  • Agents — build autonomous agents that pay for their own inference
  • x402 payments — call the API with crypto instead of an API key
  • Architecture — how requests are routed across the network