Releases: hra42/openrouter-go
v1.8.1
v1.8.0
v1.7.0 — TTS, videos, workspaces, org members
New endpoints across the SDK, plus two small fixes. Backwards-compatible — no breaking changes.
✨ New endpoints
Text-to-speech
CreateSpeech(ctx, input, model, voice, ...opts)— synthesize audio via/audio/speech. Returns rawmp3orpcmbytes you can write straight to disk. Options:WithSpeechResponseFormat,WithSpeechSpeed,WithSpeechProviderOptions.- Recipe:
docs/recipes/tts.md· Example:examples/tts/
Video generation
CreateVideo(submit) →GetVideo(poll) →GetVideoContent(download bytes). Async job model with terminal statusescompleted/failed/cancelled/expired.ListVideoModelsexposes per-model capabilities (supported aspect ratios, resolutions, durations, passthrough parameters).- Options:
WithVideoAspectRatio,WithVideoResolution,WithVideoSize,WithVideoDuration,WithVideoSeed,WithVideoGenerateAudio,WithVideoFrameImages,WithVideoInputReferences,WithVideoCallbackURL,WithVideoProviderOptions. - Recipe:
docs/recipes/videos.md· Example:examples/videos/
Workspaces (Management API)
ListWorkspaces,CreateWorkspace,GetWorkspace,UpdateWorkspace,DeleteWorkspace— all accept UUID or slug.AddWorkspaceMembers/RemoveWorkspaceMembersfor bulk member management. Requires a Provisioning (Management) API key.- Recipe:
docs/recipes/workspaces.md· Example:examples/workspaces/
Organization members
ListOrganizationMembers(ctx, opts)with offset/limit pagination. Returns roles (org:admin/org:member) and contact details. Requires a Provisioning key.- Recipe:
docs/recipes/organization-members.md· Example:examples/list-organization-members/
🐛 Fixes
- ZDR pricing discount now decodes as a number (previously failed for endpoints that returned numeric discount values).
- OAuth: removed the phantom
CreateAuthCodemethod that was never backed by a real endpoint. The working PKCE helper isExchangeAuthCode.
📚 Docs
- New recipes under
docs/recipes/for workspaces, videos, organization members, and guardrails. AGENTS.mdendpoint dispatch table extended with the new surface so AI coding agents can discover them.
🔗 Links
- Docs site: https://openrouter-go.hra42.lol
- Godoc: https://pkg.go.dev/github.com/hra42/openrouter-go@v1.7.0
Full changelog: v1.6.1...v1.7.0
v1.6.1 — Agent-friendly docs + documentation site
No library code changes — this is a documentation and tooling release. Upgrade is safe; no breaking changes, no behavior changes.
✨ Highlights
- 🌐 New docs site: openrouter-go.hra42.lol — landing page, recipe sidebar, built from
docs/so there's a single source of truth. - 🤖
AGENTS.md— SDK conventions, streaming contract, endpoint decision table, common pitfalls. The file AI coding agents (Claude Code, Cursor, etc.) should read first when building on top of the SDK. - 📇
llms.txt— curated task → file index for LLM-driven discovery. - 📖 Package-level godoc —
doc.gogivespkg.go.devand localgo doca proper overview instead of a bare symbol list.
📚 New docs under docs/
- 21 task-indexed recipes under
docs/recipes/: getting started, streaming, tool calling, structured output, MCP conversion, web search, image/audio/PDF/text-file inputs, embeddings, rerank, Responses API (beta), transforms, provider preferences, errors, app attribution, broadcast webhooks, account & keys, model discovery, OAuth PKCE. docs/api-surface.json— machine-readable snapshot of the public API (187 types, 258 funcs). Agents and doc tooling can answer "does this SDK have X?" with one file read instead of grepping.
🛠️ Tooling
cmd/gen-api-surface— walks the package viago/docand regeneratesdocs/api-surface.json. CI now fails if the snapshot is stale, so public-API changes can't ship without refreshing it.- Deploy workflow —
.github/workflows/deploy-docs.ymlpublishes the Docusaurus site to the custom domain on pushes tomainthat touchdocs/**orwebsite/**.
📦 Module hygiene
website/is now a nested Go module (emptywebsite/go.mod), so the Docusaurus scaffold (~2MB of JS/CSS) is excluded from the Go module tarball. Downstreamgo getstays lean — you only get Go files, markdown docs, and the machine-readable API snapshot.
🔗 Links
- Docs site: https://openrouter-go.hra42.lol
- Godoc: https://pkg.go.dev/github.com/hra42/openrouter-go@v1.6.1
- Recipes index: https://github.com/hra42/openrouter-go/tree/v1.6.1/docs/recipes
- AI-agent entry point: https://github.com/hra42/openrouter-go/blob/v1.6.1/AGENTS.md
Full changelog: v1.6.0...v1.6.1
v1.6.0: Rerank API Support
🚀 Features
- Rerank API Support: Added full support for OpenRouter's Rerank API, allowing for more relevant search and retrieval results. (#58)
🔗 Links
Full Changelog: v1.5.2...v1.6.0
v1.5.1
Support both string and number formats for OTLP ints for Broadcast Feature
Updates the OTLP any-value unmarshaling to handle integer values provided as either JSON strings or JSON numbers. This improves compatibility with various OTLP export implementations that may deviate from the canonical string-only representation for 64-bit integers.
Includes a new FlexInt type to manage polymorphic decoding while maintaining a consistent internal string representation for downstream processing.
Full Changelog: v1.5.0...v1.5.1
v1.5.0
What's Changed
- Add Claude Code GitHub Workflow by @hra42 in #50
- Adds Broadcast webhook utilities and OTLP parsing by @hra42 in #51
- Implements Anthropic Messages API support by @hra42 in #52
- Enforces linting and resolves unhandled errors by @hra42 in #53
- Implement Guardrails API support by @hra42 in #54
- Add Guardrails API, ZDR endpoints, and user models by @hra42 in #55
- Implements OAuth PKCE authentication support by @hra42 in #56
- Go 1.26 Upgrade by @hra42 in #57
Full Changelog: v1.4.1...v1.5.0