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

# singleFile

## Generate single audio file

> Generates a single audio file with specified duration and parameters

```json
{"openapi":"3.0.0","info":{"title":"Muzaic Core API","version":"1.0.0"},"tags":[{"name":"Audio","description":"Audio file generation and retrieval"}],"servers":[{"url":"https://m10.muzaic.ai","description":"Core API server"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"MuzaicAPI-Secret-Key"}}},"paths":{"/singleFile":{"post":{"summary":"Generate single audio file","description":"Generates a single audio file with specified duration and parameters","tags":["Audio"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"duration":{"type":"integer","description":"Duration in seconds","minimum":1,"maximum":300},"tags":{"type":"array","items":{"type":"integer"},"description":"Array of tag IDs"},"params":{"type":"object","description":"Generation parameters","properties":{"intensity":{"type":"integer","minimum":1,"maximum":10},"tempo":{"type":"integer","minimum":1,"maximum":10},"tone":{"type":"integer","minimum":1,"maximum":10},"variance":{"type":"integer","minimum":1,"maximum":10},"rhythm":{"type":"integer","minimum":1,"maximum":10}}},"normalize":{"type":"boolean","description":"Whether to normalize audio"}}}}}},"responses":{"200":{"description":"Single file generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiVersion":{"type":"string"},"mp3":{"type":"string","description":"Base64 encoded MP3 audio data"},"audioDuration":{"type":"number","format":"float","description":"Audio duration in seconds"},"hash":{"type":"string","description":"Generated audio hash"},"status":{"type":"string","description":"Generation status"},"tokensUsed":{"type":"integer","description":"Number of tokens consumed"},"executionTime":{"type":"number","format":"float","description":"Execution time in seconds"}}}}}},"400":{"description":"Invalid input data"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limit exceeded"}}}}}}
```


---

# 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.muzaic.ai/muzaic-api-docs/reference/api-reference/singlefile.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.
