# TK24 Agent Integration TK24 is an OpenAI-compatible inference gateway designed for AI agents. ## Quick Integration - **Base URL:** `https://api.tk24.ai/v1` (Drop-in replacement for OpenAI API base URL) - **Authentication:** `Authorization: Bearer ` - **Routing:** Prefix the model ID with the provider name (e.g., `gemini/gemini-2.5-flash`, `openrouter/auto`). - **Unsupported Parameters:** Do NOT send `thinking` or `reasoning_effort` fields (they will trigger an HTTP 400 error). ## Documentation Index - [Introduction](/docs): A credit-based, OpenAI-compatible LLM gateway. Top up in seconds — no accounts, no KYC. - [Quickstart](/docs/quickstart): Get your first API call working in 2 minutes. - [For AI Agents](/docs/agents): How an autonomous agent consumes the gateway as a tool — OpenAI-compatible API, machine-readable spec, and a drop-in base URL. - [Client onboarding](/docs/onboarding): End-to-end — top up, create an API key, and run inference. - [Authentication](/docs/authentication): API-key auth for inference, SIWE for key management, and x402 for payments. - Core Concepts - [Credits & Billing](/docs/concepts/billing): How balances, micro-USDC units, and overdraft protection work. - [Top up (x402)](/docs/concepts/topup): Fund your balance with USDC or USDT using the x402 payment protocol. - [Rate limits](/docs/concepts/rate-limits): Per-wallet sliding-window rate limiting and how to handle 429s. - [Choosing a model](/docs/concepts/choosing-a-model): How provider routing works — pick a provider by prefixing the model ID. - Integrations - [OpenAI SDK](/docs/integrations/openai-sdk): Drop-in — point the OpenAI SDK at the gateway by changing the base URL. - [Anthropic (Claude) models](/docs/integrations/anthropic): Call Claude models through the OpenAI-compatible API via AWS Bedrock. - [Vercel AI SDK](/docs/integrations/vercel-ai-sdk): Use the gateway with the Vercel AI SDK via an OpenAI-compatible provider. - [LangChain](/docs/integrations/langchain): Use the gateway with LangChain's OpenAI chat model. - [LlamaIndex](/docs/integrations/llamaindex): Use the gateway with LlamaIndex's OpenAI-compatible LLM. - [Cursor & Claude Code](/docs/integrations/editors): Point AI coding tools at the gateway via OpenAI-compatible settings. - [Frontend integration](/docs/integrations/frontend): Build a UI with wallet connect, x402 top-up, SIWE sign-in, and completions. - Models - [Model catalog](/docs/models/catalog): Live models, pricing, and context windows — fetched from the gateway. - [Provider notes](/docs/models/provider-notes): Per-provider and per-model quirks to be aware of. - [Pricing](/docs/models/pricing): How model prices map to what you're billed. - API Reference - [Overview](/docs/api/overview): Base URL, authentication, and the full endpoint list. - [Chat Completions](/docs/api/chat-completions): Documentation for POST /v1/chat/completions (OpenAI-compatible inference). - [List Models](/docs/api/list-models): Documentation for GET /v1/models (List available models). - [Top Up](/docs/api/topup): Documentation for POST /v1/topup (Fund wallet balance). - [Top-up History](/docs/api/topups): List a wallet's past top-ups (for receipts). - [API Keys](/docs/api/api-keys): Documentation for /v1/auth/keys endpoints (Create, list, revoke). - [Usage](/docs/api/usage): Documentation for GET /v1/usage/:wallet (Wallet balance and usage). - [Balance](/docs/api/balance): Documentation for GET /v1/balance/:wallet (Check available credit). - [Error Codes](/docs/api/errors): Error shapes, status codes, and handling behavior. - Policies & Limits - [Data & logging](/docs/operations/data-logging): What the gateway stores about your requests — and what it doesn't. - [Limits](/docs/operations/limits): Rate limits, top-up minimums, and token defaults. - Resources - [llms.txt](/docs/resources/llms): LLM-friendly plain-text docs for AI agents. - Tools - [Balance checker](/docs/tools/balance): Watch available credit balances for any address. ## API - [OpenAPI 3.1 specification](https://tk24.ai/openapi.yaml): complete machine-readable API contract — endpoints, schemas, auth - [Full docs as markdown](https://tk24.ai/llms-full.txt): every documentation page concatenated