{
  "openapi": "3.1.0",
  "info": {
    "title": "Suno 음악 생성 API",
    "description": "Suno AI 모델을 사용하여 음악을 생성하며, 보컬 및 인스트루멘탈 모드를 모두 지원합니다",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.evolink.ai",
      "description": "프로덕션 환경"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/audios/generations": {
      "post": {
        "summary": "Suno 음악 생성 API",
        "description": "- Suno AI 음악 생성 모델, 텍스트 설명 또는 가사를 기반으로 완전한 음악 생성 지원\n- 커스텀 모드 (스타일, 제목, 가사 세밀 제어) 및 심플 모드 (AI 자동 생성) 지원\n- [Persona](/ko/api-manual/audio-series/suno/suno-persona-creation) 기능 지원, 생성된 보컬/스타일 특성을 재사용할 수 있습니다\n- 비동기 처리 모드, 반환된 작업 ID로 [상태 조회](/ko/api-manual/task-management/get-task-detail)\n- 생성된 오디오 링크는 72시간 동안 유효하며, 즉시 저장해 주세요\n- 각 요청마다 여러 음악 변형이 생성됩니다",
        "operationId": "createSunoMusicGeneration",
        "tags": [
          "Audio Generation"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SunoMusicGenerationRequest"
              },
              "examples": {
                "simple_mode": {
                  "summary": "간편 모드 (초보자 권장)",
                  "value": {
                    "model": "suno-v6-beta",
                    "prompt": "A cheerful summer pop song about road trips and freedom"
                  }
                },
                "custom_mode_with_lyrics": {
                  "summary": "커스텀 모드 (가사 포함)",
                  "value": {
                    "model": "suno-v6-beta",
                    "custom_mode": true,
                    "instrumental": false,
                    "style": "pop, electronic, upbeat, female vocals, 120bpm",
                    "title": "Summer Dreams",
                    "prompt": "[Verse 1]\nDriving down the highway, windows down\nThe sun is shining on this little town\nRadio playing our favorite song\nNothing could ever go wrong\n\n[Chorus]\nSummer dreams, summer nights\nChasing stars and city lights\nWith you by my side\nI feel so alive",
                    "negative_tags": "heavy metal, screaming, sad",
                    "vocal_gender": "f"
                  }
                },
                "custom_mode_with_persona": {
                  "summary": "커스텀 모드 (Persona 사용)",
                  "value": {
                    "model": "suno-v6-beta",
                    "custom_mode": true,
                    "instrumental": false,
                    "style": "electronic pop, synth wave, 128bpm",
                    "title": "네온 드리머",
                    "prompt": "[Verse]\n네온 불빛 아래 거리를 거닐며\n도시의 맥박이 가슴 속에 뛰고\n[Chorus]\n우리는 꿈을 쫓는 자\n별빛 아래 춤을 추며",
                    "persona_id": "5c57d49ef834110496fae5aa14fec441",
                    "persona_model": "voice_persona"
                  }
                },
                "v6_wild_custom_duration": {
                  "summary": "사용자 지정 길이 (V6 Wild)",
                  "value": {
                    "model": "suno-v6-wild-beta",
                    "custom_mode": true,
                    "instrumental": false,
                    "style": "pop, electronic, upbeat",
                    "title": "Custom Duration",
                    "prompt": "[Verse]\nA new day begins\n\n[Chorus]\nWe rise together",
                    "duration": 120
                  }
                },
                "instrumental_mode": {
                  "summary": "연주 모드",
                  "value": {
                    "model": "suno-v4.5plus-beta",
                    "custom_mode": true,
                    "instrumental": true,
                    "style": "lo-fi, chill, ambient, piano, soft drums",
                    "title": "비 오는 오후"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "음악 작업 생성 성공",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioGenerationResponse"
                }
              }
            }
          },
          "400": {
            "description": "요청 매개변수가 잘못되었습니다",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Invalid request parameters",
                    "type": "invalid_request_error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "인증되지 않았거나 토큰이 유효하지 않거나 만료되었습니다",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or expired token",
                    "type": "authentication_error"
                  }
                }
              }
            }
          },
          "402": {
            "description": "할당량이 부족합니다. 충전이 필요합니다",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "insufficient_quota",
                    "message": "Insufficient quota. Please top up your account.",
                    "type": "insufficient_quota"
                  }
                }
              }
            }
          },
          "403": {
            "description": "접근이 거부되었습니다",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "model_access_denied",
                    "message": "Token does not have access to model: suno-v5-beta",
                    "type": "invalid_request_error"
                  }
                }
              }
            }
          },
          "429": {
            "description": "요청 한도를 초과했습니다",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Too many requests, please try again later",
                    "type": "rate_limit_error"
                  }
                }
              }
            }
          },
          "500": {
            "description": "서버 내부 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal server error",
                    "type": "api_error"
                  }
                }
              }
            }
          },
          "503": {
            "description": "서비스를 일시적으로 사용할 수 없습니다",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "service_unavailable",
                    "message": "No available channel for the requested model",
                    "type": "api_error"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SunoMusicGenerationRequest": {
        "type": "object",
        "required": [
          "model"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "모델 이름\n\n**하위 호환성:** 이전에 통합된 모델명(예: `suno-v5`, `suno-v4.5`, `suno-v4.5plus`, `suno-v4.5all`, `suno-v4`)은 계속 사용 가능하며, 해당 `-beta` 버전으로 자동 매핑됩니다\n\n**사용 가능한 옵션:**\n- `suno-v6-beta`: V6 (기본 권장), 더 자연스러운 보컬, 풍부한 디테일과 뛰어난 음악 표현력. Persona 및 사용자 지정 길이 지원, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자; 호환 모델명: `suno-v6`\n- `suno-v6-mini-beta`: V6 Mini, 품질과 속도의 균형을 갖춘 가볍고 빠른 버전. Persona 지원, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자; 호환 모델명: `suno-v6-mini`\n- `suno-v6-wild-beta`: V6 Wild, 기존 틀을 넘어 더 대담하고 개성 있는 스타일을 표현합니다. Persona 및 사용자 지정 길이 지원, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자; 호환 모델명: `suno-v6-wild`\n- `suno-v5.5-beta`: 고유한 취향에 맞춘 모델을 지원하는 V5.5, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자; 호환 모델명: `suno-v5.5`\n- `suno-v5-beta`: V5 버전, Voice Persona 지원, 뛰어난 음악 표현력, 더 빠른 생성, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자\n- `suno-v4.5plus-beta`: V4.5+ 향상 버전, 더 풍부한 톤, 새로운 창작 방법, 최대 8분, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자\n- `suno-v4.5all-beta`: V4.5 전체 기능 버전, 더 스마트한 프롬프트, 더 빠른 생성, 최대 8분, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자\n- `suno-v4.5-beta`: V4.5 버전, 더 스마트한 프롬프트, 더 빠른 생성, 최대 8분, 프롬프트 최대 `5000`자, 스타일 최대 `1000`자\n- `suno-v4-beta`: V4 버전, 향상된 보컬 품질, 최대 4분, 프롬프트 최대 `3000`자, 스타일 최대 `200`자",
            "enum": [
              "suno-v6-beta",
              "suno-v6-mini-beta",
              "suno-v6-wild-beta",
              "suno-v5.5-beta",
              "suno-v5-beta",
              "suno-v4.5plus-beta",
              "suno-v4.5all-beta",
              "suno-v4.5-beta",
              "suno-v4-beta"
            ],
            "example": "suno-v6-beta"
          },
          "custom_mode": {
            "type": "boolean",
            "description": "커스텀 모드 활성화\n\n**설명:**\n- `false`: 심플 모드, `prompt`만 제공하면 AI가 가사와 스타일을 자동 생성\n- `true`: 커스텀 모드, `style`, `title`, 가사 등을 세밀하게 제어 가능\n\n**커스텀 모드 필수 파라미터:**\n- `style`: 필수\n- `title`: 필수\n- `prompt`: `instrumental=false`일 때 필수 (가사로 사용)\n\n**심플 모드(`custom_mode=false`)에서는 `prompt`만 지원됩니다:**\n`style`, `title`, `negative_tags`, `vocal_gender`, `style_weight`, `weirdness_constraint`, `audio_weight`, `persona_id`, `persona_model`, `duration`은 이 모드에서 모두 지원되지 않습니다. API가 반드시 거부한다고 보장하지는 않지만, 이 매개변수들은 생성 결과에 아무런 영향을 주지 않습니다. 세밀한 제어가 필요하면 `custom_mode=true`를 사용하세요",
            "example": false,
            "default": false
          },
          "instrumental": {
            "type": "boolean",
            "description": "인스트루멘탈 음악 생성 (보컬 없음)\n\n**설명:**\n- `false`: 보컬이 포함된 음악 생성\n- `true`: 보컬 없는 인스트루멘탈/배경 음악 생성\n\n**참고:**\n- 비커스텀 모드에서는 이 파라미터가 필수 필드에 영향을 주지 않습니다\n- 커스텀 모드에서 `true`로 설정하면 `prompt`가 선택 사항이 됩니다",
            "example": false,
            "default": false
          },
          "prompt": {
            "type": "string",
            "description": "프롬프트, 원하는 음악 내용을 설명합니다\n\n**비커스텀 모드 (`custom_mode=false`):**\n- 필수, 음악 설명으로 사용되며 AI가 가사와 스타일을 자동 생성\n- 최대 길이: `3000`자\n\n**커스텀 모드 (`custom_mode=true`):**\n- `instrumental=false`일 때 필수, 정확한 가사로 사용\n- `instrumental=true`일 때 선택 사항\n- 최대 길이: V4는 `3000`자, V4.5 이상(V6 계열 포함)는 `5000`자\n\n**가사 형식 제안:**\n- `[Verse]`, `[Chorus]`, `[Bridge]` 등의 태그로 가사 구조를 구성하세요",
            "example": "A cheerful summer pop song about road trips and freedom"
          },
          "style": {
            "type": "string",
            "description": "음악 스타일 지정\n\n**설명:**\n- 사용자 정의 모드(`custom_mode=true`)에서 필수\n- 음악의 장르, 분위기 또는 예술적 방향을 정의합니다\n- 영어로 쉼표로 구분된 태그 사용을 권장합니다\n\n**문자 제한:**\n- V4: 최대 `200`자\n- V4.5 이상(V6 계열 포함): 최대 `1000`자\n\n**일반적인 스타일 태그:**\n- 장르: pop, rock, jazz, classical, electronic, hip-hop, r&b, country, folk\n- 분위기: happy, sad, energetic, calm, romantic, dark, uplifting\n- 악기: piano, guitar, drums, bass, violin, saxophone, synthesizer\n- 보컬: male vocals, female vocals, choir, harmonies\n- 템포: slow, fast, upbeat, groovy, 120bpm\n\n심플 모드(`custom_mode=false`)에서는 지원되지 않습니다. 이 모드에서는 AI가 `prompt`를 바탕으로 스타일을 자동 생성하므로 이 매개변수를 전송해도 적용되지 않습니다.",
            "example": "pop, electronic, upbeat, female vocals"
          },
          "title": {
            "type": "string",
            "description": "곡 제목\n\n**설명:**\n- 사용자 정의 모드(`custom_mode=true`)에서 필수\n- 플레이어 인터페이스 및 파일명에 표시됩니다\n- 최대 길이: `80`자\n\n심플 모드(`custom_mode=false`)에서는 지원되지 않습니다. 이 모드에서는 AI가 제목을 자동 생성하므로 이 매개변수를 전송해도 적용되지 않습니다.",
            "maxLength": 80,
            "example": "Summer Dreams"
          },
          "negative_tags": {
            "type": "string",
            "description": "제외 스타일, 피하고 싶은 음악 스타일이나 특성을 지정합니다\n\n**설명:**\n- 최대 길이: `200`자 (모든 모델 동일)\n\n**예시:**\n- `heavy metal, screaming, sad`\n- `rap, fast tempo`\n\n`custom_mode=true`일 때만 지원됩니다. 심플 모드에서 전송해도 적용되지 않습니다.",
            "maxLength": 200,
            "example": "heavy metal, screaming"
          },
          "vocal_gender": {
            "type": "string",
            "description": "보컬 성별 선호\n\n**옵션:**\n- `m`: 남성 목소리\n- `f`: 여성 목소리\n\n**참고:**\n- `custom_mode=true`일 때만 적용됩니다\n- 이 매개변수는 확률만 높이며, 지정된 성별이 반드시 따라지는 것을 보장하지 않습니다\n- 심플 모드(`custom_mode=false`)에서는 지원되지 않으며, 전송해도 적용되지 않습니다",
            "enum": [
              "m",
              "f"
            ],
            "example": "f"
          },
          "style_weight": {
            "type": "number",
            "description": "스타일 가중치, 지정된 스타일 준수 강도를 제어합니다\n\n**범위:** `0.0` ~ `1.0`, 소수점 이하 최대 두 자리이며 `0.01`의 배수\n\n**설명:**\n- 값이 높을수록 지정된 스타일을 더 강하게 따릅니다\n- `0`은 유효한 값으로 지정 스타일을 따르지 않음을 의미하며 모델에 전달됩니다\n\n`custom_mode=true`일 때만 지원됩니다. 심플 모드에서 전송해도 적용되지 않습니다.",
            "minimum": 0,
            "maximum": 1,
            "example": 0.7,
            "multipleOf": 0.01
          },
          "weirdness_constraint": {
            "type": "number",
            "description": "기이함 제약, 출력의 창의성/실험성 정도를 제어합니다\n\n**범위:** `0.0` ~ `1.0`, 소수점 이하 최대 두 자리이며 `0.01`의 배수\n\n**설명:**\n- 값이 높을수록 더 창의적이고 실험적인 결과가 생성됩니다\n- 값이 낮을수록 더 전통적이고 보수적인 결과가 생성됩니다\n- `0`은 유효한 값이며 모델에 전달됩니다\n\n`custom_mode=true`일 때만 지원됩니다. 심플 모드에서 전송해도 적용되지 않습니다.",
            "minimum": 0,
            "maximum": 1,
            "example": 0.3,
            "multipleOf": 0.01
          },
          "audio_weight": {
            "type": "number",
            "description": "오디오 가중치, 오디오 특성의 가중치를 제어합니다\n\n**범위:** `0.0` ~ `1.0`, 소수점 이하 최대 두 자리이며 `0.01`의 배수\n\n**설명:**\n- `0`은 유효한 값이며 모델에 전달됩니다\n\n`custom_mode=true`일 때만 지원됩니다. 심플 모드에서 전송해도 적용되지 않습니다.",
            "minimum": 0,
            "maximum": 1,
            "example": 0.5,
            "multipleOf": 0.01
          },
          "persona_id": {
            "type": "string",
            "description": "Persona ID, 이미 생성된 Persona 스타일을 이번 음악 생성에 적용합니다\n\n`custom_mode=true`일 때만 사용 가능합니다. [Suno Persona 생성](/ko/api-manual/audio-series/suno/suno-persona-creation) API를 통해 획득하며, 적용 후 일관된 보컬 및 스타일 특성을 유지할 수 있습니다\n\n**획득 방법:** Persona 작업 완료 후 `result_data.persona_id`에서 가져옵니다\n\n심플 모드(`custom_mode=false`)에서는 지원되지 않습니다.\n\nV5 및 V6 계열 모델(`suno-v5-beta` / `suno-v5.5-beta` / `suno-v6-beta` / `suno-v6-mini-beta` / `suno-v6-wild-beta` 및 해당 `-beta` 없는 호환 이름)에서만 지원되며, 다른 모델에서 전송하면 매개변수 오류가 반환됩니다.",
            "example": "5c57d49ef834110496fae5aa14fec441"
          },
          "persona_model": {
            "type": "string",
            "description": "Persona 적용 방식\n\n**옵션:**\n1. `style_persona`: 스타일 지향형으로 편곡, 리듬, 음색 등 음악 스타일 특성을 중시\n2. `voice_persona`: 보컬 지향형으로 음색, 창법, 음역 등 보컬 특성을 중시\n\n두 방식 모두 V5 및 V6 계열 모델(`suno-v5-beta` / `suno-v5.5-beta` / `suno-v6-beta` / `suno-v6-mini-beta` / `suno-v6-wild-beta` 및 해당 `-beta` 없는 호환 이름)에서만 사용할 수 있으며 `custom_mode=true`가 필요합니다. 반드시 `persona_id`와 함께 사용해야 하며, `persona_id` 없이 `persona_model`만 전송하면 적용되지 않습니다(`persona_id`는 단독으로 사용할 수 있습니다).",
            "enum": [
              "style_persona",
              "voice_persona"
            ],
            "example": "style_persona"
          },
          "duration": {
            "type": "integer",
            "description": "원하는 오디오 길이(초)\n\n`custom_mode=true`이고 모델이 `suno-v5.5-beta`, `suno-v6-beta`, `suno-v6-mini-beta`, `suno-v6-wild-beta`(또는 해당 `-beta` 없는 호환 이름)일 때만 사용할 수 있습니다. `10`~`360` 사이의 정수여야 합니다. 다른 모델이나 심플 모드에서는 지원되지 않으며, 전송하면 매개변수 오류가 반환됩니다.\n\n**길이 제어 효과는 모델에 따라 다릅니다(가능한 범위에서 반영되며 정확한 길이는 보장되지 않습니다):**\n- `suno-v6-wild-beta`, `suno-v5.5-beta`: 대체로 지정한 길이에 맞춰 생성됩니다\n- `suno-v6-beta`: `60`초 이상을 권장합니다. `60`초 미만으로 설정해도 보통 약 `60`초의 오디오가 생성됩니다\n- `suno-v6-mini-beta`: 현재 길이 매개변수가 적용되지 않으며, 보통 약 3분의 음악이 생성됩니다\n\n동일한 요청으로 반환된 여러 곡 중 일부는 지정한 길이와 차이가 있을 수 있습니다. 생략하면 모델이 길이를 결정합니다(보통 3~6분). 요청당 과금되며 실제 길이는 비용에 영향을 주지 않습니다.",
            "minimum": 10,
            "maximum": 360,
            "example": 120
          },
          "callback_url": {
            "type": "string",
            "description": "작업 종료 상태 알림을 위한 HTTPS 콜백 URL\n\n**콜백 시점:**\n- GroAPI는 작업이 종료 상태(`completed`, `failed`, `cancelled`)에 도달할 때 한 번만 전송합니다\n- `text`, `first` 같은 업스트림 중간 단계는 전달하지 않습니다\n- 콜백 본문은 `GET /v1/tasks/{id}`의 작업 상세 구조와 동일합니다\n\n**보안 제한:**\n- HTTPS만 지원\n- 내부 IP 주소로의 콜백 금지\n- URL 길이는 `2048`자를 초과할 수 없음\n\n**콜백 메커니즘:**\n- 요청당 타임아웃: `10`초\n- 최초 요청 실패 후 최대 `3`회 재시도\n- 2xx 상태 코드를 반환하면 성공으로 간주",
            "format": "uri",
            "example": "https://your-domain.com/webhooks/suno-callback"
          }
        }
      },
      "AudioGenerationResponse": {
        "type": "object",
        "properties": {
          "created": {
            "type": "integer",
            "description": "작업 생성 타임스탬프",
            "example": 1766319090
          },
          "id": {
            "type": "string",
            "description": "작업 ID, 작업 상태 및 결과를 조회하는 데 사용됩니다",
            "example": "task-unified-1766319089-oqs9cue4"
          },
          "model": {
            "type": "string",
            "description": "실제 사용된 모델 이름",
            "example": "suno-v6-beta"
          },
          "object": {
            "type": "string",
            "enum": [
              "audio.generation.task"
            ],
            "description": "작업 유형"
          },
          "progress": {
            "type": "integer",
            "description": "작업 진행률 (0-100)",
            "minimum": 0,
            "maximum": 100,
            "example": 0
          },
          "status": {
            "type": "string",
            "description": "작업 상태",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "cancelled"
            ],
            "example": "pending"
          },
          "task_info": {
            "$ref": "#/components/schemas/AudioTaskInfo",
            "description": "오디오 작업 상세"
          },
          "type": {
            "type": "string",
            "enum": [
              "audio"
            ],
            "description": "작업 출력 유형",
            "example": "audio"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage",
            "description": "사용량 및 과금 정보"
          }
        }
      },
      "AudioTaskInfo": {
        "type": "object",
        "properties": {
          "can_cancel": {
            "type": "boolean",
            "description": "작업 취소 가능 여부",
            "example": true
          },
          "estimated_time": {
            "type": "integer",
            "description": "예상 완료 시간 (초)",
            "example": 120
          }
        }
      },
      "Usage": {
        "type": "object",
        "description": "사용량 및 과금 정보",
        "properties": {
          "billing_rule": {
            "type": "string",
            "description": "과금 규칙",
            "enum": [
              "per_call",
              "per_token",
              "per_second"
            ],
            "example": "per_call"
          },
          "credits_reserved": {
            "type": "number",
            "description": "예상 소비 크레딧",
            "minimum": 0,
            "example": 10
          },
          "user_group": {
            "type": "string",
            "description": "사용자가 속한 과금 그룹",
            "example": "default"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "오류 코드 식별자"
              },
              "message": {
                "type": "string",
                "description": "오류 설명"
              },
              "type": {
                "type": "string",
                "description": "오류 유형"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "##모든 API는 Bearer Token 인증이 필요합니다##\n\n**API Key 받기:**\n\n[API Key 관리 페이지](https://evolink.ai/dashboard/keys)를 방문하여 API Key를 받으세요\n\n**요청 헤더에 추가:**\n```\nAuthorization: Bearer YOUR_API_KEY\n```"
      }
    }
  }
}