Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api-reference/asyncapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ channels:
- `Authorization: Bearer <api_key>` - Required for authentication (see security section)
- `model: <model_name>` - Optional; specifies which TTS model to use (see bindings). Falls back to `s2.1-pro` when omitted or unrecognized
## Handshake
The WebSocket handshake must be performed over **HTTP/1.1**. HTTP/2 clients are rejected with `400 invalid protocol`, so disable HTTP/2 for the upgrade request (e.g. `curl --http1.1`).
operations:
receiveText:
action: receive
Expand Down
2 changes: 1 addition & 1 deletion api-reference/endpoint/openapi-v1/speech-to-text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ iconType: "solid"
---

<Warning>
This BETA endpoint only accepts `application/form-data` and `application/msgpack`.
This BETA endpoint only accepts `multipart/form-data` and `application/msgpack`. It does not accept `application/json` (the audio field cannot be carried as JSON/base64).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify the JSON restriction.

JSON/base64 combines a media type and an encoding. State that the endpoint rejects JSON bodies with base64-encoded audio.

Proposed wording
-This BETA endpoint only accepts `multipart/form-data` and `application/msgpack`. It does not accept `application/json` (the audio field cannot be carried as JSON/base64).
+This BETA endpoint only accepts `multipart/form-data` and `application/msgpack`. It does not accept `application/json` with base64-encoded audio.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This BETA endpoint only accepts `multipart/form-data` and `application/msgpack`. It does not accept `application/json` (the audio field cannot be carried as JSON/base64).
This BETA endpoint only accepts `multipart/form-data` and `application/msgpack`. It does not accept `application/json` with base64-encoded audio.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api-reference/endpoint/openapi-v1/speech-to-text.mdx` at line 10, Update the
endpoint description to explicitly state that it rejects JSON request bodies
containing base64-encoded audio, while preserving the listed accepted content
types and avoiding the ambiguous “JSON/base64” phrasing.

Source: Coding guidelines

</Warning>
Loading