> For the complete documentation index, see [llms.txt](https://docs.ai.neevcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ai.neevcloud.com/api-reference/model-routing/audio.md).

# Audio

## Convert the text to speech

> This will convert the text to audio which is human understandable and is OpenAI compatible.

```json
{"openapi":"3.0.3","info":{"title":"Model Routing Service API","version":"0.1.0"},"servers":[{"url":"https://inference.ai.neevcloud.com","description":"Inference / model-routing API base URL"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"JWT token or API key for authentication."}},"schemas":{"SpeechRequest":{"type":"object","description":"Request body for text to speech generation","required":["model","voice","input"],"properties":{"model":{"type":"string","description":"ID of the model to use for audio generation"},"voice":{"type":"string","description":"Voice preset for speech generation"},"input":{"type":"string","description":"Text input for audio generation"},"response_format":{"type":"string","enum":["mp3"],"default":"mp3","description":"format of audio generation"},"speed":{"type":"number","format":"float","minimum":0.25,"maximum":4,"default":1,"description":"Speed of audio translation"}}},"OpenAIErrorResponse":{"type":"object","description":"Error response following OpenAI's error format.","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"A human-readable error message."},"type":{"type":"string","description":"The type of error."},"param":{"type":"string","nullable":true,"description":"The parameter that caused the error."},"code":{"type":"string","nullable":true,"description":"A machine-readable error code."}}}}}}},"paths":{"/v1/audio/speech":{"post":{"tags":["Audio"],"summary":"Convert the text to speech","description":"This will convert the text to audio which is human understandable and is OpenAI compatible.","operationId":"createSpeech","parameters":[{"name":"OrgID","in":"header","description":"Organization ID is needed if the request is made by using the access token.","required":false,"schema":{"type":"string"}},{"name":"ProjectID","in":"header","description":"Project ID is needed if the request is made by using the access token.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Request body for converting the text to audio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"}}}},"responses":{"200":{"description":"Successful audio generation response","content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIErrorResponse"}}}},"401":{"description":"Invalid or missing API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIErrorResponse"}}}},"403":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ai.neevcloud.com/api-reference/model-routing/audio.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
