curl-XPOST"https://api.julep.ai/api/sessions/YOUR_SESSION_ID/chat" \-H"Authorization: Bearer $JULEP_API_KEY" \-H"Content-Type: application/json" \-d'{ "messages": [ { "role": "user", "content": "Hello, can you help me with a task?" } ], "stream": false, "max_tokens": 150 }'
Streaming Responses
To stream the agent's response:
curl-N-H"Authorization: Bearer $JULEP_API_KEY" \-H"Content-Type: application/json" \-d'{ "messages": [ { "role": "user", "content": "Tell me a story about a brave knight." } ], "stream": true }' \"https://api.julep.ai/api/sessions/YOUR_SESSION_ID/chat"