# AI Music API > REST API documentation for AI music generation, extension, cover workflows, lyric timing, task polling, and account credits. ## Core Links - [Home](https://udioapi.pro/): Product overview and entry point for the AI music API platform. - [API Documentation](https://udioapi.pro/docs): Endpoint directory with authentication, request fields, examples, polling, credit costs, and webhook behavior. - [API Changelog](https://udioapi.pro/docs/changelog): Dated public API changes with compatibility notes, integration impact, and links to updated endpoint documentation. - [Pricing](https://udioapi.pro/pricing): Available credit plans and account top-up options for API usage. ## API Documentation - [Music Generate API](https://udioapi.pro/docs/v2-generate): Creates asynchronous AI music tasks in inspiration or custom mode, with chirp-v6 model selection, image_urls image-to-music input, and webhook support. - [Extend Music API](https://udioapi.pro/docs/v2-extend): Extends a completed generated track while inheriting its settings or applying new lyrics and style controls. - [Replace Section API](https://udioapi.pro/docs/v2-replace-section): Regenerates a 10-second-or-longer window of a completed generated song and returns full-length results; covers window rules, lyrics, length checks and refunds. - [Music Cover Image API](https://udioapi.pro/docs/generate-music-cover): Creates cover artwork for a completed music task and explains how to poll the cover task status. - [Timestamped Lyrics API](https://udioapi.pro/docs/v2-timestamped-lyrics): Returns word-level lyric timestamps and alignment data for a selected audio result from a generation task. - [Upload and Cover API](https://udioapi.pro/docs/v2-upload-cover): Creates an AI cover from a public audio URL and documents generation, polling, model, image_urls, and duration constraints. - [Task Status API](https://udioapi.pro/docs/v2-feed): Polls a public workId until music generation succeeds or fails and returns the generated audio results. - [Credits API](https://udioapi.pro/docs/query-credits): Returns the authenticated account credit balance and total consumed credits for usage monitoring. - [Callback Music Generate API](https://udioapi.pro/docs/generate-callback): Creates a music task with a public callback URL and documents the asynchronous webhook payload sequence. - [WAV Conversion API](https://udioapi.pro/docs/v2-wav-conversion): Converts a generated audio result to WAV while keeping the public task ID for polling, logs, and webhooks. - [MiniMax Music API](https://udioapi.pro/docs/v2-minimax-generate): Creates and polls asynchronous MiniMax music tasks through the dedicated public MiniMax endpoints. ## Key Facts - Public API base URL: https://udioapi.pro/api - Authentication: `Authorization: Bearer YOUR_API_KEY` for endpoints that require an account. - Async create endpoints return a public task ID; use that same ID for status polling, logs, and user webhooks. - Only public task IDs (for example workId) are valid for status polling, logs, and webhooks. Do not invent undocumented IDs, fields, or routes. - Follow the status values and polling interval documented for each endpoint; most async tasks should be polled every 5-10 seconds. - Current music models: chirp-v6 (12 credits), chirp-v6-mini (10 credits), chirp-v6-wild (12 credits). Legacy identifiers chirp-v3-5 to chirp-v5-5 remain accepted at their historical price and are served by chirp-v6 (chirp-v5, chirp-v5-5) or chirp-v6-mini (all others); model_name in results reports the model actually used. - Image to music: /v2/generate and /v2/upload-cover/generate accept image_urls (up to 5 publicly accessible JPEG/PNG/WEBP URLs, 10MB each, +1 credit) in inspiration / non-custom mode only. - Text limits apply to every model: custom prompt 5000, inspiration prompt 3000, style 1000, title 80 (100 for upload-cover); longer input is truncated, not rejected. - Create endpoints return 422 (fix parameters) or 500 (temporary, retry later) with data.refunded when a request is rejected during validation; tasks that fail after being accepted are marked FAILED and refunded automatically. - Replace Section (/v2/replace-section, 5 credits): edits a song from /v2/generate or /v2/extend under the same API key; the window must be 10 s or longer, at most 50% of the song and end before the song ends; about 10 s on each side also changes; results whose length differs from the source by more than 15 s are discarded, and if none remain the task fails and is refunded. ## Integration Notes - Keep API keys on the server and never expose them in browser code or public repositories. - We do not permanently store generated images, audio, or other media files. After a task completes, promptly download the files and save them to your own server or object storage. Returned media URLs are temporary and may expire or become unavailable; do not use them as permanent links. Keeping a task ID or URL does not replace storing the files. We do not guarantee a fixed retention period. - Use the exact field names and task ID format shown on the endpoint page being integrated. - Treat callbacks as asynchronous notifications and verify the task through the documented status endpoint when needed. ## Contact - Website: https://udioapi.pro - Support: support@udioapi.pro