API Documentation
Complete guide to integrating Chewie into your healthcare applications.
Chewie is a medical AI assistant built specifically for Community Health Workers (CHWs) in sub-Saharan Africa. Chewie provides structured clinical guidance following the Assessment → Action → Advice protocol.
Supports English, Swahili, Hausa, Yoruba, Zulu, Amharic, and French
Sub-2 second response times optimized for mobile networks
Automatic detection of emergency conditions requiring referral
Chewie API is fully compatible with OpenAI's Chat Completions API. Use your existing OpenAI SDK - just change the base URL and API key.
from openai import OpenAI
client = OpenAI(
api_key="chewie_live_sk_your_key_here",
base_url="https://api.chewie.care/v1"
)
response = client.chat.completions.create(
model="chewie-1.2",
messages=[
{"role": "user", "content": "Child with fever for 2 days"}
]
)
print(response.choices[0].message.content)Works with: OpenAI Python SDK, OpenAI Node.js SDK, LangChain, LlamaIndex, and any OpenAI-compatible client.
Make a Request
Send a POST request to the chat endpoint.
Parse the Response
Extract the assistant message from the response.
Minimal Example
curl -X POST https://api.chewie.care/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "chewie-1.2",
"messages": [
{"role": "user", "content": "A child has fever and diarrhea for 2 days"}
],
"temperature": 0.3,
"max_tokens": 500
}'https://api.chewie.care/v1All API endpoints are relative to this base URL. Use HTTPS for all requests.