OpenAI-compatible • mainnet

Inference without an account or provider key.

Use the standard chat-completions shape from a browser, Python SDK, OpenCode, curl, or an autonomous agent. Fund API credit with Ark or Lightning, or let a wallet-owning agent pay and sign with Ark-402.

3 included calls/day5 sats afterProvider ZDRNo trainingBearer + 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 output4,096 tokens

Provider credentials, routing controls, upstream model identifiers, and wholesale cost data stay server-side. ArkAPI does not log prompt or completion content. Every provider request requires zero data retention and denies training/data collection; prompt content is still processed transiently 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 a Bearer token or Ark-402 credit does not retrieve earlier conversations.

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.

Compatibility and boundaries

CapabilityStatus
OpenAI chat completionsJSON and streaming SSE, including stream_options.include_usage
Output allowanceUp to 4,096 tokens; web chat offers an explicit continuation when reached
Function/tool callsSupported
Python and compatible SDKsDirect API access; no interactive challenge
AuthenticationBearer session 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.3 or later, keep discovery pointed at https://arkapi.dev (or its onion origin), and run arkapi mcp serve locally. Chat appears as arkapi_chat_completions.