Endpoints
The most important API endpoints developers will want to use.
/chat API Endpoint
/chat API EndpointUsing the API Key
Streaming Response Example
import requests
url = "https://uiuc.chat/api/chat-api/chat"
headers = {
'Content-Type': 'application/json',
}
data = {
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "Your system prompt here"
},
{
"role": "user",
"content": "What is in these documents?"
}
],
"openai_key": "YOUR-OPENAI-KEY-HERE",
"temperature": 0.1,
"course_name": "your-course-name",
"stream": True,
"api_key": "YOUR_API_KEY"
}
response = requests.post(url, headers=headers, json=data)
print(response.text)Non-Streaming Response Example
Retrieval Only
Image Input Example
Multiple Messages in a Conversation
NCSA hosted models example
Tool Use
Coming soon
Last updated