Everwhy Open Everwhy
Everwhy for Schools API · v1

Hear how your students sound, without marking every test by hand.

The Schools API scores pronunciation sound by sound, runs speaking tests that estimate a CEFR level, and reads your classes, assignments and results. It uses the same scoring and credits as the Everwhy app.

Get your keys API reference

Quickstart

  1. Get a key. Your school's admin makes keys on the Keys page. A ew_test_… sandbox key gives sample scores and costs nothing; a ew_live_… key scores real recordings and spends your school's credits. Each key is shown once: keep it on your server, never in an app or a web page.
  2. Say hello.
    curl https://everwhy.app/api/schools/v1/me \
      -H "Authorization: Bearer ew_test_YOUR_KEY"
  3. Score a recording. Send the audio (m4a, webm, ogg or wav, up to 30 seconds and 2 MB), the words the student was asked to say, and the voice.
    curl https://everwhy.app/api/schools/v1/assessments/pronunciation \
      -H "Authorization: Bearer ew_test_YOUR_KEY" \
      -F audio=@hola.wav \
      -F text="Hola, ¿cómo estás?" \
      -F language=es-ES \
      -F student=stu_1042

    You get scores for the whole phrase (overall, accuracy, fluency, completeness) and for each word, with up to three tips. student is your own id for the student: never a name or an email.

  4. Run a speaking test for a level, such as Spanish A1 (es-a1; GET /speaking-tests lists them). Record each prompt, then finish it for the report.
    curl https://everwhy.app/api/schools/v1/assessments/speaking \
      -H "Authorization: Bearer ew_test_YOUR_KEY" \
      -H "Content-Type: application/json" \
      -d '{"test": "es-a1", "student": "stu_1042"}'
    
    curl https://everwhy.app/api/schools/v1/assessments/ASSESSMENT_ID/items/ITEM_ID \
      -H "Authorization: Bearer ew_test_YOUR_KEY" -F audio=@prompt1.wav
    
    curl -X POST https://everwhy.app/api/schools/v1/assessments/ASSESSMENT_ID/finish \
      -H "Authorization: Bearer ew_test_YOUR_KEY"
  5. Read classes and results. GET /classes, GET /classes/{id} and GET /assignments/{id}/results show your Everwhy classes, by nickname, with each student's progress.
  6. Hear when results are ready. Add a webhook (POST /webhooks, or on the Keys page) and Everwhy POSTs assessment.finished to it, signed with the header Everwhy-Signature: t=…,v1=….

Checking a webhook's signature

Take the raw body and the t value from the header, compute HMAC-SHA256 of t + "." + body with your webhook's secret, and compare it with v1. Refuse anything older than five minutes.

import hashlib, hmac, time

def verified(body: bytes, header: str, secret: str) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    if abs(time.time() - int(parts["t"])) > 300:
        return False
    expected = hmac.new(secret.encode(), f"{parts['t']}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])

Credits and limits

WhatCredits
Pronunciation15 a minute of speech, charged per started 4 seconds
Speaking test100, refunded when nothing is scored
Classes, assignments, results, usageFree
Anything with a sandbox keyFree

Each live key can make 120 requests a minute (60 for sandbox keys). Every answer carries X-RateLimit-Remaining and X-Request-Id; too many requests answer 429 rate_limited with retry_after in seconds. Errors look like {"code": "no_credits", "detail": "…", "request_id": "…"}.

Students' data

Recordings are scored and deleted at once: only the scores are kept. Nothing is used for ads. Your school can read and delete every result (DELETE /assessments/{id}). Read the student data terms.