Asha logoAsha|AIAPI
Asha API

Overview

The Asha API returns Asha's evidence-grounded medical answers over the open A2A v1.0 protocol (HTTP and JSON). Every answer ships with its sources. Keys created on askasha.org reach Asha only.

At a glance

ItemValue
Base URLhttps://api.askasha.org
ProtocolA2A v1.0 over HTTPS, JSON bodies. Every response carries the A2A-Version: 1.0 header.
AuthenticationAuthorization: Bearer <api_key> on every call except signup and health.
Agentasha (alias health). Omitting agent_id defaults to Asha.
Key scopeAsha only. Any other agent id returns 403.
Inputtext/plain inside JSON message parts, up to 500,000 characters per message.
OutputA task with a response artifact (Markdown text) and a provenance artifact (sources, citations, evidence count, model).
Free plan50 queries a month, 10 a day, no card. Paid plans in Plans, limits, and errors.

Endpoints

MethodPathPurposeAuth
POST/a2a/v1/message:sendAsk Asha; returns the completed task.API key
POST/a2a/v1/message:streamSame request, streamed as server-sent events.API key
GET/a2a/v1/tasks/{task_id}Fetch one task.API key
GET/a2a/v1/tasksList your tasks (paginated, filterable).API key
POST/a2a/v1/tasks/{task_id}:cancelCancel a task that is still working.API key
GET/a2a/v1/healthService health.None
POST/api/a2a/signupCreate a free key.None
GET/api/a2a/usageUsage and limits for your key.API key
POST/api/a2a/rotate-keyReplace your key; the old one stops at once.API key
POST/api/a2a/upgradeStripe checkout for a paid plan.API key
GET/api/a2a/portalStripe billing portal.API key
POST/v1/chat/completionsOpenAI Chat Completions wire format over Asha (Drop-in with OpenAI SDKs).API key
GET/v1/modelsModel ids for the OpenAI-compatible endpoint.API key
GET/api/a2a/baaCurrent Business Associate Agreement (JSON, Markdown, HTML).None
POST/api/a2a/baa/acceptAccept the agreement for your account (BAA, self-serve).API key
GET/api/a2a/baa/statusAcceptance state and PHI readiness.API key

First call

bash
curl -X POST https://api.askasha.org/a2a/v1/message:send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "asha",
    "message": {
      "role": "user",
      "parts": [{"text": "Which antihypertensives are safe in pregnancy?"}]
    },
    "metadata": {"audience": "clinician", "session_id": "visit-2041"}
  }'

Three ways in

PathBest for
A2A message:send / message:streamFull task records, provenance artifact, pipeline phases.
OpenAI-compatible /v1/chat/completionsExisting OpenAI SDK, LangChain, LiteLLM, or Vercel AI code: change base_url and the key.
asha command lineKeys, questions, usage, and the BAA from a terminal; one file, no dependencies.
Back to the API page