Bitcoin-paid AI inference without an account or provider key.
Use an OpenAI-compatible AI inference API from a browser, Python SDK, OpenCode, curl, MCP host, or autonomous agent. Authorize with Bearer credit, standard L402 over Lightning, or wallet-signed Ark-402 over Ark.
Endpoint and pricing
| Base URL | https://chat.arkapi.dev/v1 |
|---|---|
| Model | arkapi-code-fast |
| Included | 3 successful calls per funded identity each UTC day |
| Then | 5 sats per successful call |
| Maximum output | 8,192 tokens |
Provider credentials, routing controls, upstream model identifiers, and wholesale cost data stay server-side. ArkAPI does not log prompt or completion content or store conversation history. The inference provider does not use inputs or outputs for training and says inference content is not retained by default, except temporary reliability or abuse review. Prompt content is processed to generate the response.
The browser keeps only the open tab's conversation in memory and sends that thread with the next request. Refreshing or closing the tab clears it. Reusing Bearer, L402, or Ark-402 credit does not retrieve earlier conversations.
Standard L402 for Lightning agents
Call the endpoint without authorization to receive an L402 macaroon and 100-sat BOLT11 invoice. Pay it with a wallet that returns the payment preimage, then reuse the credential for 5-sat calls. The LSAT scheme alias is accepted.
Validate the invoice amount before paying, cap agent spend, cache successful credentials, and never blindly repeat an ambiguous payment. Bark supplies the server invoice but a paying Bark wallet does not need native L402 support.
Fund a Bearer session
Create a session, pay either returned method, then keep the token private. The browser interface automates this flow.
The response includes one Bearer token, a Lightning invoice, and an Ark address. Payment details expire after 15 minutes. Save the token before leaving the page; it cannot be recovered.
Python OpenAI SDK
Use a funded ArkAPI Bearer token as the API key. Machine endpoints return JSON or SSE directly and do not require a browser challenge.
Keep the token in an environment variable or secret store—not source code, command history, or an agent prompt.
OpenCode
Connect a custom provider named arkapi, store the funded Bearer token when prompted, and add this project configuration:
Run /connect, choose Other, enter provider ID arkapi, then paste only the ArkAPI Bearer token. See the OpenCode provider guide.
Ark-402 for wallet-owning agents
An agent can fund reusable credit with one Ark payment, then sign the exact method, path, and body for later calls. No Bearer token or account is required.
Use a dedicated low-balance Bark wallet and local spend limits. Automatic top-ups are opt-in; request signing does not reveal the wallet seed to ArkAPI. An unauthenticated call returns the Ark-402 challenge and same-origin Link headers for the machine-readable service manifest and agent notes.
Native Tor workflow
The same mainnet Ark-402 credit works across clearnet and the ArkAPI onion service because both use the fixed arkapi.dev signing realm.
HTTP_PROXY is required because the onion origin uses HTTP; ARK402_PROXY explicitly routes merchant traffic while the local Bark REST connection remains on loopback. Use socks5h so DNS stays at the Tor proxy.
Bitcoin AI inference FAQ
What is ArkAPI Chat?
ArkAPI Chat is an OpenAI-compatible AI inference API and browser chat for humans, developers, and autonomous agents.
How much does ArkAPI Chat cost?
Each funded identity receives three successful included calls per UTC day. Later successful calls cost 5 Bitcoin sats each.
How do I pay for AI inference?
Fund a Bearer session with Ark or Lightning, use standard L402 by paying its BOLT11 invoice and presenting the payment preimage, or use Ark-402 so a wallet-owning agent can fund reusable credit and sign requests.
Does ArkAPI Chat store conversations?
ArkAPI does not log prompt or completion content and does not store conversation history. The browser keeps only the open tab's conversation in memory.
Compatibility and boundaries
| Capability | Status |
|---|---|
| OpenAI chat completions | JSON and streaming SSE, including stream_options.include_usage |
| MCP Chat | Completed, non-streaming assistant text plus the full structured response and billing receipt |
| Output allowance | Up to 8,192 tokens; web chat offers an explicit continuation when reached |
| Function/tool calls | Supported |
| Python and compatible SDKs | Direct API access; no interactive challenge |
| Authentication | Bearer session, standard L402 credential, or body-bound Ark-402 signature |
| Transport | HTTPS clearnet and native Tor onion |
| Upstream access | Isolated adapter; credential never reaches callers |
chat.arkapi.dev is the OpenAI-compatible HTTP API, not a remote MCP endpoint. MCP hosts should install ArkAPI client v0.1.7 or later, keep discovery pointed at https://arkapi.dev (or its onion origin), and run arkapi mcp serve locally. The client natively automates Bearer and Ark-402 and reports the L402 HTTP flow through arkapi_payment_methods; it does not automatically pay L402 invoices. Chat appears as arkapi_chat_completions. Use the direct Chat endpoint when live SSE streaming is required.