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.
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 | 4,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.
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.
Compatibility and boundaries
| Capability | Status |
|---|---|
| OpenAI chat completions | JSON and streaming SSE, including stream_options.include_usage |
| Output allowance | Up to 4,096 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 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.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.