Skip to main content
The inference API follows the OpenAI API shape, so any OpenAI-compatible client works after you change two settings: the base URL and the key.

What it is

  • Base URL: https://api.openfinance.tech/agent/v1
  • Key: the same open_ key you use for the MCP server. One key covers trading and inference.
  • Billing: each request is paid for from your account’s AI credits.
Use it when you are building something that needs a language model, such as a bot, a dashboard or an agent, and you would rather not manage a separate model provider account. It is separate from the MCP server: MCP lets an AI client trade through OpenFinance, and the inference API lets your code talk to a model.

Endpoints

The API has two endpoints: Both paths are relative to the base URL.

Authentication

Send your key in either header:
Please make an account at openfinance.tech to get your keys. The key is on the External AI page in the app; see Authentication for where to find it and how to store it.
The key that calls a model is the same key that can place trades and move funds from your wallet. Keep it on your server, in an environment variable. Never build it into a browser app, a mobile app or a public repository.

Quick start

1

Get your key

Copy the open_ key from External AI and export it:
2

Pick a model

List the models and choose an id:
Model ids use a provider/model form, for example anthropic/claude-fable-5.1. The list changes as models are added, so read it from the API instead of hard-coding a long list.
3

Send a request

More examples, including the OpenAI SDK, are on the Examples page.

AI credits

Inference is billed in AI credits. These are the same credits the OpenFinance chat uses, so API calls and in-app chat draw on one balance. Check your balance:
The response reports your available credits, your limit and your usage so far: To add credits, top up in the OpenFinance app. The app shows how many credits a deposit buys before you confirm. See Models and AI credits. How many credits a request uses depends on the model and on the length of the input and output. Larger models cost more per request.

Tips

  • Start with a small model to test your integration, then switch the model id.
  • Check the balance before a long job and stop cleanly if a request is rejected for insufficient credits.
  • Keep trading and inference apart in your code. An app that only needs a model should never pass the key to anything that calls trading tools.

FAQ

No. The open_ key from External AI works for both the MCP server and the inference API.
Call GET /models for the live list. It is the source of truth.
Not by itself. The inference API returns text. To let a model trade, connect an AI client to the MCP server, where every trade needs your confirmation.
No. Every request needs your key and uses credits.

Next

Examples

curl, the OpenAI SDK and streaming.

Authentication

Where the key lives and how to keep it safe.