Skip to main content
POST
Each request costs 10,000 credits with lana-thinking or 2,000 credits with lana-fast. Requires a paid plan. Free-plan requests return 403 Forbidden. For the quickstart, streaming events, and error handling, see the Lana API guide.

Request Parameters

string
required
lana-thinking for multi-step analysis, with up to 20 lookup steps per turn; it can stream reasoning. lana-fast for quick lookups and single facts, with up to 4 lookup steps per turn.
  • lana-thinking
  • lana-fast
array
required
The conversation, oldest first. It needs at least one message, and the last one must have role user. The API doesn’t store conversations; send the whole conversation on every request.
string
required
Who wrote the message.
  • user
  • assistant
any
required
A non-empty string, or a non-empty array of content blocks. text is allowed in both roles, image and tool_result only in user messages, and tool_use only in assistant messages.
number
default:"8192"
The most output tokens Lana can write in one model step. A turn with lookups takes several steps, so the turn’s total output_tokens can be higher. Below 2,048, lana-thinking doesn’t reason.
boolean
default:"false"
true streams server-sent events. false returns one JSON object when the turn ends.
string
Extra instructions, such as “Answer in three bullet points.” They’re added to Lana’s own instructions, not used in place of them.
object
Lana-only options. All are optional. The include_* options make output possible; Lana decides whether to send it.
boolean
default:"true"
Removes the transfer, swap, and token-launch tools. Leave it true.
string
default:"markdown"
plain tells Lana not to use Markdown and removes {{cite:N}} markers. source events still arrive.
  • markdown
  • plain
boolean
default:"false"
Allows UI components, as ui_block and ui_schema events.
boolean
default:"false"
Allows up to 3 suggested follow-up questions.
boolean
default:"false"
Allows downloadable CSV, JSON, or text files, as document events.
boolean
default:"false"
Lets Lana read up to 10,000 transactions of an address’s history (50,000 for counts and totals), up to 3 scans per turn. Mainnet only. Without it, Lana reads up to 100 transactions per lookup. Same flat price.
object
Who’s asking.
string
The user’s address, so “my wallet” and “my balance” work.
string
wallet or token: what wallet is. Needs wallet.
string
An IANA time zone, such as America/New_York, so “today” works.
string
default:"mainnet"
The network to look up.
  • mainnet
  • devnet
array
Up to 8 images added to the last user message. image blocks in messages don’t count toward this limit.
string
required
The image URL.
string
required
Always image.
  • image
object
Used by the Orb explorer. You don’t need it.
object
Used by the Orb explorer. You don’t need it.

Authorizations

X-Api-Key
string
header
required

Your Helius API key.

Body

application/json
model
enum<string>
required

lana-thinking for multi-step analysis, with up to 20 lookup steps per turn; it can stream reasoning. lana-fast for quick lookups and single facts, with up to 4 lookup steps per turn.

Available options:
lana-thinking,
lana-fast
Example:

"lana-thinking"

messages
object[]
required

The conversation, oldest first. It needs at least one message, and the last one must have role user. The API doesn't store conversations; send the whole conversation on every request.

Minimum array length: 1
max_tokens
integer
default:8192

The most output tokens Lana can write in one model step. A turn with lookups takes several steps, so the turn's total output_tokens can be higher. Below 2,048, lana-thinking doesn't reason.

Required range: 1 <= x <= 8192
stream
boolean
default:false

true streams server-sent events. false returns one JSON object when the turn ends.

system
string

Extra instructions, such as "Answer in three bullet points." They're added to Lana's own instructions, not used in place of them.

Required string length: 1 - 10000
extensions
object

Lana-only options. All are optional. The include_* options make output possible; Lana decides whether to send it.

Response

The turn ran. With "stream": false, one JSON object. Check stop_reason: a turn that fails after producing content still returns 200, with stop_reason: "error" and an error object.

With "stream": true, a stream of server-sent events. Each event is an event: <type> line and a data: <json> line, followed by a blank line. The stream starts with message_start and always ends with message_end or error. New event types and fields can be added; ignore any you don't recognize.

The non-streaming response. The answer is the text blocks, joined in order.

id
string
required
Example:

"msg_3f9c..."

type
enum<string>
required
Available options:
message
role
enum<string>
required
Available options:
assistant
model
enum<string>
required
Available options:
lana-thinking,
lana-fast
content
object[]
required
stop_reason
enum<string>
required
  • end_turn: Lana finished its answer.
  • max_tokens: the answer hit max_tokens and may be cut off.
  • tool_use: the turn ended on a lookup step, usually at the step limit.
  • error: the turn failed. The answer is incomplete.
Available options:
end_turn,
max_tokens,
tool_use,
error
usage
object
required
ui_schema
object

All UI components as one tree. Present when include_ui_schema is on and there's something to show.

documents
object[]

Present when include_documents is on and Lana made files.

follow_up
string[]

Present when include_followups is on and Lana suggested questions.

sources
object[]

Present when Lana used web pages.

error
object