curl --request POST \ --url https://api.synthra.ai/v1/sessions/session_abc123def456/messages \ --header 'Authorization: Bearer synthra_live_abc123def456' \ --header 'Content-Type: application/json' \ --data '{ "content": "What is the current price of SOL?", "role": "user" }'
Copy
{ "messageId": "msg_xyz789ghi012", "sessionId": "session_abc123def456", "role": "assistant", "content": "The current price of Solana (SOL) is $147.23 USD, up 3.2% in the last 24 hours.", "tokens": 28, "createdAt": "2024-03-08T14:30:15Z"}
Message Operations
Send Message
Send a message and receive AI response
POST
/
v1
/
sessions
/
{sessionId}
/
messages
Copy
curl --request POST \ --url https://api.synthra.ai/v1/sessions/session_abc123def456/messages \ --header 'Authorization: Bearer synthra_live_abc123def456' \ --header 'Content-Type: application/json' \ --data '{ "content": "What is the current price of SOL?", "role": "user" }'
Copy
{ "messageId": "msg_xyz789ghi012", "sessionId": "session_abc123def456", "role": "assistant", "content": "The current price of Solana (SOL) is $147.23 USD, up 3.2% in the last 24 hours.", "tokens": 28, "createdAt": "2024-03-08T14:30:15Z"}
curl --request POST \ --url https://api.synthra.ai/v1/sessions/session_abc123def456/messages \ --header 'Authorization: Bearer synthra_live_abc123def456' \ --header 'Content-Type: application/json' \ --data '{ "content": "What is the current price of SOL?", "role": "user" }'
Copy
{ "messageId": "msg_xyz789ghi012", "sessionId": "session_abc123def456", "role": "assistant", "content": "The current price of Solana (SOL) is $147.23 USD, up 3.2% in the last 24 hours.", "tokens": 28, "createdAt": "2024-03-08T14:30:15Z"}