x402 Chat

AI chat

Send a message to the Elfa AI and receive a complete response. Suited for agents and integrations that do not support server-sent events (SSE).

Analysis types and required fields:

  • chat (default) — general conversation. Requires message.
  • macro — macro market overview. No message needed.
  • summary — quick market summary. No message needed.
  • tokenIntro — token introduction. Requires assetMetadata with symbol, or chain + contractAddress.
  • tokenAnalysis — token trade setup analysis. Same assetMetadata requirements as tokenIntro.
  • accountAnalysis — Twitter/X account analysis. Requires assetMetadata.username.

message is only used for analysisType: "chat" and is ignored for other analysis types. adaptive speed is not available on x402.

Send includeSources: true to receive data.sources: the links the research behind the answer read, with a kind each. Links only: page and post content is not returned.

assetMetadata fields (when applicable):

  • symbol — token ticker symbol (e.g. "BTC", "$ETH")
  • chain — blockchain name (e.g. "ethereum", "solana")
  • contractAddress — token contract address
  • username — Twitter/X username for account analysis

Cost: speed based. Pay a flat price per turn with the exact scheme (fast $1, expert $2). Where the 402 also lists batch-settlement (Base), you can instead deposit once into a payment channel: each turn is then capped at fast $2 / expert $6 and charged only what it cost. Requires x402 payment.

post/x402/v2/chat

Request

  • Base URL: https://api.elfa.ai
  • URL: https://api.elfa.ai/x402/v2/chat
  • Auth: none required

Request body

messagestring

The user message. Required when analysisType is "chat"; ignored for all other analysis types.

sessionIdstring

Omit to start a new conversation. Pass the sessionId from a previous response to continue an existing conversation.

analysisType'chat' | 'macro' | 'summary' | 'tokenIntro' | 'tokenAnalysis' | 'accountAnalysis'

The type of analysis to perform. Defaults to "chat".

  • chat — conversational AI. Requires message.
  • macro — macro market overview.
  • summary — quick market summary.
  • tokenIntro — token introduction. Requires assetMetadata.
  • tokenAnalysis — in-depth token analysis. Requires assetMetadata.
  • accountAnalysis — Twitter/X account analysis. Requires assetMetadata.username.
includeSourcesboolean

Set true to receive data.sources: the links the research behind the answer read. Omitted or false leaves the response unchanged.

speed'fast' | 'expert'

Response

Ok

successboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.