Skip to main content
POST
/
v1
/
ai
/
chat
Send message to AI assistant
curl --request POST \
  --url https://api.joyride.exchange/v1/ai/chat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "message": "What's the current price of SOL?",
  "conversation_id": "550e8400-e29b-41d4-a716-446655440000"
}
EOF
"event: text\ndata: {\"content\":\"SOL is currently trading at $200.\"}\n\nevent: done\ndata: {\"conversation_id\":\"550e8400-e29b-41d4-a716-446655440000\",\"usage\":{\"input_tokens\":150,\"output_tokens\":45}}\n"

Authorizations

Authorization
string
header
required

JWT obtained from POST /v1/auth/verify after SIWS authentication. Include as: Authorization: Bearer <jwt>

Body

application/json
message
string
required

User message text (max 10,000 characters)

Maximum string length: 10000
Example:

"What's the current price of SOL?"

conversation_id
string<uuid>

Existing conversation ID to continue. Omit to start a new conversation.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

SSE stream of AI response events

Server-Sent Events stream. Each event has format:

event: <type>
data: <json>