Skip to main content
POST
/
models
/
v2
/
Qwen
/
Qwen2-Audio-7B-Instruct
audio-text-to-text
curl --request POST \
  --url https://api.bytez.com/models/v2/Qwen/Qwen2-Audio-7B-Instruct \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Describe this audio"
        },
        {
          "type": "audio",
          "url": "https://dn720307.ca.archive.org/0/items/various-bird-sounds/Various%20Bird%20Sounds.mp3"
        }
      ]
    }
  ],
  "stream": true,
  "params": {
    "min_length": 10,
    "max_length": 100,
    "temperature": 0.5
  }
}
'
{
  "error": "<string>",
  "output": {
    "role": "assistant",
    "content": "The sound is of raindrops and birds chirping."
  }
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for audio-text-to-text models

messages
object[]
required

Conversation history.

Example:
[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this audio"
},
{
"type": "audio",
"url": "https://dn720307.ca.archive.org/0/items/various-bird-sounds/Various%20Bird%20Sounds.mp3"
}
]
}
]
stream
boolean

Enable text streaming.

params
object

Model-specific parameters.

Response

Successful audio-text-to-text response.

error
string | null
required

Null on success; otherwise an error message.

output
object
required

The output message generated by the model

Example:
{
"role": "assistant",
"content": "The sound is of raindrops and birds chirping."
}