Sessions
Send a prompt
POST
/
session
/
{session_id}
/
prompt_async
Queue a prompt for a session
curl --request POST \
--url https://litellm-rust.onrender.com/session/{session_id}/prompt_async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": {
"modelID": "claude-opus-4-5"
},
"parts": [
{
"type": "text",
"text": "Summarize the repo README."
}
]
}
'import requests
url = "https://litellm-rust.onrender.com/session/{session_id}/prompt_async"
payload = {
"model": { "modelID": "claude-opus-4-5" },
"parts": [
{
"type": "text",
"text": "Summarize the repo README."
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: {modelID: 'claude-opus-4-5'},
parts: [{type: 'text', text: 'Summarize the repo README.'}]
})
};
fetch('https://litellm-rust.onrender.com/session/{session_id}/prompt_async', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));⌘I
Queue a prompt for a session
curl --request POST \
--url https://litellm-rust.onrender.com/session/{session_id}/prompt_async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": {
"modelID": "claude-opus-4-5"
},
"parts": [
{
"type": "text",
"text": "Summarize the repo README."
}
]
}
'import requests
url = "https://litellm-rust.onrender.com/session/{session_id}/prompt_async"
payload = {
"model": { "modelID": "claude-opus-4-5" },
"parts": [
{
"type": "text",
"text": "Summarize the repo README."
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: {modelID: 'claude-opus-4-5'},
parts: [{type: 'text', text: 'Summarize the repo README.'}]
})
};
fetch('https://litellm-rust.onrender.com/session/{session_id}/prompt_async', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));