Skip to content

docs: LLM-first quickstart + GET /v1/models and chat-completions reference (#3)#4

Closed
longnhp12 wants to merge 2 commits into
Deva-me-AI:mainfrom
longnhp12:feat/3-llm-first-docs
Closed

docs: LLM-first quickstart + GET /v1/models and chat-completions reference (#3)#4
longnhp12 wants to merge 2 commits into
Deva-me-AI:mainfrom
longnhp12:feat/3-llm-first-docs

Conversation

@longnhp12

Copy link
Copy Markdown
Collaborator

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 listed POST /v1/chat/completions only as a table row and didn't document GET /v1/models at all.

Part of #3 — covers the three active checkboxes (LLM-first quickstart, canonical path + /v1/models reference, SDK separation). The deferred deva.me/docs hosting 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 via POST /agents/register, make a chat completion (cURL + official OpenAI Python/JS SDKs with base_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 full GET /v1/models subsection (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 expanded POST /v1/chat/completions subsection (canonical path per D1, request shape, streaming usage chunk, karma billing surfaces, 402 insufficient_quota). AI-resources table updated.
  • SDK separation (README + quickstart): @deva-ai/sdk (Deva-me-AI/deva-agent-sdk, native LLM/agent-resources SDK — on GitHub, npm publish pending) vs @bitplanet/deva-sdk ("Login with Deva" auth SDK). Since the native SDK is unpublished, the quickstart deliberately uses the OpenAI SDKs and has no npm install @deva-ai/sdk instructions.
  • README.md — "Call any LLM" added as quickstart step 2 + SDKs section; docs/pricing.md points at GET /v1/models / deva.me/models as the live per-model pricing source.

Verification

  • GET /v1/models example JSON copied from the live production endpoint (34 models, post-Bitplanet-L1/content-server#1959 contract with descriptions/modalities/real capabilities).
  • Chat-completion usage/402 shapes validated against content-server source (app/schemas/ai_completions.py, app/apis/ai_completions.py).
  • All intra-repo anchors resolve; no stale /v1/ai/chat/completions references; no install instructions for the unpublished SDK.

🤖 Generated with Claude Code

@longnhp12

Copy link
Copy Markdown
Collaborator Author

Superseded — reopening as a regular same-repo PR (branch docs/3-llm-first, identical content) once write access is sorted; fork PRs can't run the claude-review check (no OIDC for forks).

@longnhp12 longnhp12 closed this Jun 10, 2026
@longnhp12 longnhp12 deleted the feat/3-llm-first-docs branch June 10, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant