Skip to main content
POST
/
ai
/
v2
/
chat
/
completions
Generate chat completions with Messari AI
curl --request POST \
  --url https://api.messari.io/ai/v2/chat/completions \
  --header 'Content-Type: application/json' \
  --header 'X-Messari-API-Key: <api-key>' \
  --data '
{
  "messages": [
    {}
  ],
  "allow_clarification_query": true,
  "generate_related_questions": 2,
  "inline_citations": true,
  "response_format": "markdown",
  "stream": false,
  "verbosity": "balanced"
}
'
{
  "data": {
    "messages": [
      {}
    ]
  },
  "error": "<string>",
  "metadata": {
    "status": "<string>",
    "trace_id": "aSDinaTvuI8gbWludGxpZnk=",
    "charts": [
      {}
    ],
    "related_questions": [
      "<string>"
    ],
    "sources": [
      {}
    ]
  }
}
x402 Support: Supported. See the x402 guide.
This endpoint provides Messari’s v2 chat completion interface for contextual crypto analysis. For implementation details and authentication options, see:

Authorizations

X-Messari-API-Key
string
header
required

Body

application/json
messages
object[]
required

Array of messages in the conversation history

allow_clarification_query
boolean
default:true

Whether the AI can ask for clarification when the query is ambiguous

Adds AI generated related questions to use as follow up questions

inline_citations
boolean
default:true

Adds inline citation document references in the payload metadata

response_format
string
default:markdown

Text format for the response. Values accepted are 'markdown' and 'plaintext'.

stream
boolean
default:false

Stream the response through the API

verbosity
string
default:balanced

Controls the length and detail level of the AI-generated response. Values accepted are 'succinct', 'balanced', and 'verbose'.

Response

Default response

data
object
required
error
string
metadata
object