ChewieDocumentation

API Documentation

Complete guide to integrating Chewie into your healthcare applications.

About Chewie API

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.

Multilingual

Supports English, Swahili, Hausa, Yoruba, Zulu, Amharic, and French

Fast Inference

Sub-2 second response times optimized for mobile networks

Danger Signs

Automatic detection of emergency conditions requiring referral

OpenAI Compatible
Drop-in replacement for OpenAI API

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.

Quick Start
Get started with the Chewie API in 3 simple steps.
1

Get an API Key

Create an API key from the API Keys page.

Create Key
2

Make a Request

Send a POST request to the chat endpoint.

3

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
  }'
Base URL
https://api.chewie.care/v1

All API endpoints are relative to this base URL. Use HTTPS for all requests.