Skip to main content
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));

Authorizations

Authorization
string
header
required

Your LITELLM_MASTER_KEY. Default for local Docker Compose: sk-local

Path Parameters

session_id
string
required

Body

application/json
model
object
required
parts
object[]
required

Response

Prompt queued