Skip to content

[DOCS] Document CreateSpeech SDK method and Audio API surface #609

Closed

Description

Summary

Schemas v0.25.0 added the OpenAI-compatible Audio API (POST /v1/audio/speech) and the Go SDK now exposes it via Client.CreateSpeech (returns raw audio bytes in the requested response_format).

Implementation: inference-gateway/sdk#169 (commit a3b6ecd)

Please document the new Audio API surface for SDK users.

Acceptance Criteria

  • SDK reference lists CreateSpeech(ctx, provider, CreateSpeechRequest) ([]byte, error) and notes the return value is raw audio bytes in the requested response_format (mp3 by default)
  • Docs mention CreateSpeechRequest fields: model, input (max 4096 chars), voice, optional instructions, response_format (mp3/opus/aac/flac/wav/pcm), speed (0.25 to 4.0), and reference_audio (base64, voice cloning, only honored by providers that support it, not OpenAI)
  • Docs state that the Audio API is provider-gated (ENABLE_AUDIO server flag, currently OpenAI) and unsupported providers return 400 with "The Audio API is not supported by this provider yet."

Activity

  1. added
    documentation
    on Aug 31, 2026
  2. added theissue type on Aug 31, 2026
  3. moved this to Todo in 2026on Aug 31, 2026
  4. edenreich commented on Aug 31, 2026

    @edenreich
    Contributor

    @claude Can you work on this? use /ponytail:ponytail

  5. inference-gateway-maintainer commented on Aug 31, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 2m 52s —— View job • docs/issue-609-20260831-1150


    Done - PR #614 opened

    • Gather context (endpoint docs already existed in api-reference.md from docs: document audio api voice cloning #612; the gap was SDK-side)
    • Verify the real Go SDK surface against inference-gateway/sdk@main (sdk.go, generated_types.go)
    • Document CreateSpeech(ctx, provider, CreateSpeechRequest) ([]byte, error) returning raw audio bytes in the requested ResponseFormat (mp3 default)
    • Field table: Model, Input (4096 max), Voice, Instructions, ResponseFormat, Speed (0.25-4.0), ReferenceAudio
    • Provider gating: ENABLE_AUDIO flag + the 400 The Audio API is not supported by this provider yet.
    • Validate: bun run lint:md, bun run format:check, bun run build - all pass

    Notes

    • One new section, ### Speech synthesis, in the Go part of sdks.md, sitting next to ### Image generation and following its shape. No other page touched - api-reference.md already covers the HTTP endpoint, so the new section links to it instead of repeating it.
    • ReferenceAudio is *[]byte in Go, not a base64 string: the docs say to pass raw sample bytes, since encoding/json base64-encodes them on the wire. Double-encoding is the obvious trap here.
    • Used the ptr(...) helper the rest of the page uses, not the new(...) from the images section (new is a Go builtin - that snippet only compiles with a local shadow). Left the images section alone; out of scope.

    Create a PR - already opened as #614.
    | Branch

  6. moved this from Todo to In progress in 2026on Aug 31, 2026
  7. moved this from In progress to QA in 2026on Aug 31, 2026
  8. moved this from QA to Done in 2026on Aug 31, 2026
  9. inference-gateway-releaser commented on Sep 22, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.14 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions