ArkAPI.dev Fund
Bitcoin AI inference API • OpenAI-compatible • mainnet

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.

3 included calls/day5 sats afterNo prompt loggingNo trainingBearer + L402 + Ark-402Native Tor

Endpoint and pricing

Base URLhttps://chat.arkapi.dev/v1
Modelarkapi-code-fast
Included3 successful calls per funded identity each UTC day
Then5 sats per successful call
Maximum output8,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.

Authorization: L402 <macaroon>:<payment_preimage>

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.

curl -sS https://chat.arkapi.dev/v1/sessions \ -H 'Content-Type: application/json' \ -d '{"amount_sats":100}'

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.

import os from openai import OpenAI client = OpenAI( api_key=os.environ["ARKAPI_TOKEN"], base_url="https://chat.arkapi.dev/v1", ) reply = client.chat.completions.create( model="arkapi-code-fast", messages=[{"role": "user", "content": "Explain Ark in one paragraph."}], ) print(reply.choices[0].message.content)

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:

{ "$schema": "https://opencode.ai/config.json", "provider": { "arkapi": { "npm": "@ai-sdk/openai-compatible", "name": "ArkAPI", "options": { "baseURL": "https://chat.arkapi.dev/v1" }, "models": { "arkapi-code-fast": { "name": "ArkAPI Code Fast" } } } } }

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.

body='{"model":"arkapi-code-fast","messages":[{"role":"user","content":"Reply OK"}]}' ark402-client --topup 100 post \ --body "$body" \ https://chat.arkapi.dev/v1/chat/completions

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.

export HTTP_PROXY=socks5h://127.0.0.1:9050 export HTTPS_PROXY=socks5h://127.0.0.1:9050 export ARK402_PROXY=socks5h://127.0.0.1:9050 export NO_PROXY=127.0.0.1,localhost ark402-client post --body "$body" \ http://bf7hn23jgyo5umvbi2lzzkb62ts3glxd2pnfksecqmyi4yglgdevs2ad.onion/v1/chat/completions

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

CapabilityStatus
OpenAI chat completionsJSON and streaming SSE, including stream_options.include_usage
MCP ChatCompleted, non-streaming assistant text plus the full structured response and billing receipt
Output allowanceUp to 8,192 tokens; web chat offers an explicit continuation when reached
Function/tool callsSupported
Python and compatible SDKsDirect API access; no interactive challenge
AuthenticationBearer session, standard L402 credential, or body-bound Ark-402 signature
TransportHTTPS clearnet and native Tor onion
Upstream accessIsolated 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.