docs: LLM-first quickstart + GET /v1/models and chat-completions reference (#3)#5
Conversation
|
Claude finished @longnhp12's task —— View job PR #5 Review — LLM-first docsOverall this is a strong, well-structured docs PR. The LLM-first restructuring reads cleanly (OpenRouter-style 3 steps), the Findings1. Karma↔USD rate stated two ways (potentially confusing) —
Every other doc states the rate as 2. Cost-vs-karma example math doesn't quite add up — 3. 4. Truncated 5. Doc cross-links — pricing "2x OpenRouter" vs Minor / nits
Security / performanceNo concerns — documentation-only change. Example secrets are placeholders ( Verdict: Approve-worthy after a quick look at items 1–3 (rate framing, reference-side rounding note, and the |
…istinction (review feedback)
Context
Workstream 3/4 (Docs) of the Deva LLM API v1 epic (
Bitplanet-L1/cross-eco-internal-docs#248). Per #3: docs led with agent identity/registration and had no LLM on-ramp; the API reference listedPOST /v1/chat/completionsonly as a table row and didn't documentGET /v1/modelsat all.Part of #3 — covers the three active checkboxes (LLM-first quickstart, canonical path +
/v1/modelsreference, SDK separation). The deferreddeva.me/docshosting checkbox stays open, so this PR intentionally does not close the issue.What
docs/quickstart.md— restructured to lead with "Call the Deva LLM API" (OpenRouter-style 3 steps): get a key viaPOST /agents/register, make a chat completion (cURL + official OpenAI Python/JS SDKs withbase_url = https://api.deva.me/v1), and read costs (usage.cost,usage.deva.karma_cost/karma_balance,X-Deva-Karma-*headers, streaming final-chunk usage). The agent-platform quickstart is preserved below under its own heading.docs/api-reference.md— new fullGET /v1/modelssubsection (query params, list envelope, all model fields incl.description,input/output_modalities, USD-per-token + karma pricing strings, capabilities, cache headers, detail route) and an expandedPOST /v1/chat/completionssubsection (canonical path per D1, request shape, streaming usage chunk, karma billing surfaces,402 insufficient_quota). AI-resources table updated.@deva-me/agent-sdk(Deva-me-AI/deva-agent-sdk, the native LLM/agent-resources SDK — now published to npm) vs@bitplanet/deva-sdk("Login with Deva" auth SDK). The quickstart leads with cURL + the official OpenAI SDKs and the SDKs section adds realnpm install @deva-me/agent-sdkinstructions with a nativeDevaAgent.chat.createexample (second commit, added after the package published).README.md— "Call any LLM" added as quickstart step 2 + SDKs section;docs/pricing.mdpoints atGET /v1/models/ deva.me/models as the live per-model pricing source.Verification
GET /v1/modelsexample JSON copied from the live production endpoint (34 models, post-Bitplanet-L1/content-server#1959contract with descriptions/modalities/real capabilities).usage/402shapes validated against content-server source (app/schemas/ai_completions.py,app/apis/ai_completions.py)./v1/ai/chat/completionsor@deva-ai/sdkreferences; the native-SDK example matches the published@deva-me/agent-sdk@0.2.0README/source.🤖 Generated with Claude Code