/edu/openapi.yaml
Endpoints
The quote body is
{ "media_type": "text" | "image" | "video" | "voice" | "music" }. Its estimated_credits matches the fixed credits used by the actual Edu generation route. Other generation body fields vary by model and tool.
The upload URL body is { "file_name": string, "mime_type": string }. With the SDK, call daven.uploads.createUrl({ fileName, mimeType }), PUT the bytes to uploadUrl, then pass finalUrl to generation.
See Session & proxy for session purposes and actor/student semantics.
/api/account returns only billing, billing_ledger, and remaining_credits. It never exposes a Daven user, runtime-key owner, payer ID, or individual balance to an education app.
Idempotent requests
/api/text/create and /api/media/create require an Idempotency-Key.
- Generate a new key for each user action. We recommend
crypto.randomUUID(). - Reuse the key only when retrying that exact request after a network failure.
- Reusing a key with another body or user action returns
409. - Retrying a completed request returns its stored response without running AI again.
/api/media/get settles after it confirms completion and releases the reservation after an explicit provider failure. If your application job restarts, reuse the same Idempotency-Key to resume polling the original task.
Image models follow a server allowlist. Classroom default is gpt-image-2.5. If you omit model, Daven picks nano-banana-2, so the app and Hub must send gpt-image-2.5. Apps cannot select a payer or billing mode. Reference images must use public HTTPS URLs.
