{
  "openapi": "3.1.0",
  "info": {
    "title": "Taan Music API",
    "version": "1.2.0",
    "description": "Create music from text, uploaded inputs or MIDI, and refine a saved version. Submit a request, retain its job ID, and check progress until the result is ready. Requests require a Taan API key."
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/api/v1/music/intents": {
      "post": {
        "operationId": "intents",
        "description": "Register the complete inputs for one composition and receive file upload instructions. Registration does not start generation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentRequest"
              },
              "examples": {
                "valid": {
                  "value": {
                    "inputs": [
                      {
                        "kind": "text_prompt",
                        "representation": "text",
                        "text_content": "Gentle piano"
                      }
                    ],
                    "duration_sec": 30
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Registration succeeded. Save the returned identifiers and any upload instructions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intent"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "uploads": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Save this key and the exact body for retries. Use a new key for an intentionally new request.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[!-~]+$"
            }
          }
        ]
      }
    },
    "/api/v1/music/generate": {
      "post": {
        "operationId": "generate",
        "description": "Compatibility endpoint for registered text/input intents. Submit project_id and audio_format. Exact retries return the same job; changing format returns 409. Upload missing files and complete the upload to resume an existing job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRequest"
              },
              "examples": {
                "valid": {
                  "value": {
                    "project_id": "11111111-1111-4111-8111-111111111111",
                    "audio_format": "mp3"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request accepted. Check the returned status resource until complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "job_id": "11111111-1111-4111-8111-111111111111",
                      "status": "queued",
                      "status_url": "/api/v1/jobs/11111111-1111-4111-8111-111111111111"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/refine": {
      "post": {
        "operationId": "refine",
        "description": "Request a change to a saved version from text or input generation. Unsupported source versions return 422 before paid work. Unchanged or unsupported edits return the original version without a new charge. Without a key, identical project/source/instruction/format requests return the same job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefineRequest"
              },
              "examples": {
                "valid": {
                  "value": {
                    "project_id": "11111111-1111-4111-8111-111111111111",
                    "music_version_id": "11111111-1111-4111-8111-111111111111",
                    "instruction": "Gentler"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request accepted. Check the returned status resource until complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "job_id": "11111111-1111-4111-8111-111111111111",
                      "status": "queued",
                      "status_url": "/api/v1/jobs/11111111-1111-4111-8111-111111111111"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "UNSUPPORTED_REFINEMENT_SOURCE: use a supported music version from text or input generation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Save this key and the exact body for retries. Use a new key for an intentionally new request."
          }
        ]
      }
    },
    "/api/v1/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "description": "Check progress or retrieve a completed result with fresh download links. Reading a job does not create or charge for new music.",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "job_id": "11111111-1111-4111-8111-111111111111",
                      "operation": "generate",
                      "status": "running",
                      "stage": "analyzing",
                      "result": null,
                      "error": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/music/intents/{project_id}/complete-upload": {
      "post": {
        "operationId": "completeIntentUploads",
        "description": "Check all uploaded inputs. Send an empty body. Completing uploads alone does not request music. Safe to repeat with the same project.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparationReadiness"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "state": "ready",
                      "inputs": [
                        {
                          "input_id": "22222222-2222-4222-8222-222222222222",
                          "state": "ready"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/intents/{project_id}/readiness": {
      "get": {
        "operationId": "intentReadiness",
        "description": "Check whether registered inputs are ready. Ready inputs still require a generation request.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparationReadiness"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "state": "ready",
                      "inputs": [
                        {
                          "input_id": "22222222-2222-4222-8222-222222222222",
                          "state": "ready"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/intents/{project_id}/refresh-uploads": {
      "post": {
        "operationId": "refreshIntentUploads",
        "description": "Refresh pending upload URLs for the same registered inputs. Files listed in arrived_input_ids do not need to be uploaded again.",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Intent"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "uploads": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/text": {
      "post": {
        "operationId": "textMusic",
        "description": "Create music directly from a prompt. Idempotency-Key is required; repeat the same key and body to recover the same job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextRequest"
              },
              "examples": {
                "valid": {
                  "value": {
                    "prompt": "Gentle piano",
                    "duration_sec": 12
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request accepted. Check the returned status resource until complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "job_id": "11111111-1111-4111-8111-111111111111",
                      "status": "queued",
                      "status_url": "/api/v1/jobs/11111111-1111-4111-8111-111111111111"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Save this key and the exact body for retries. Use a new key for an intentionally new request."
          }
        ]
      }
    },
    "/api/v1/music/input": {
      "post": {
        "operationId": "inputMusic",
        "description": "Create music from registered video, script or mixed inputs. Upload files first, then submit project_id. Exact retries return the existing job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRequest"
              },
              "examples": {
                "valid": {
                  "value": {
                    "project_id": "11111111-1111-4111-8111-111111111111",
                    "audio_format": "wav"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request accepted. Check the returned status resource until complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "job_id": "11111111-1111-4111-8111-111111111111",
                      "status": "queued",
                      "status_url": "/api/v1/jobs/11111111-1111-4111-8111-111111111111"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/midi": {
      "post": {
        "operationId": "midiMusic",
        "description": "Convert a ready MIDI asset to audio. Supply its project, asset, caption, seed and output format. One initial generation per project; exact retries return the existing job.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MIDIRequest"
              },
              "examples": {
                "valid": {
                  "value": {
                    "project_id": "11111111-1111-4111-8111-111111111111",
                    "midi_asset_id": "11111111-1111-4111-8111-111111111111",
                    "caption": "Warm piano",
                    "seed": 17,
                    "audio_format": "mp3"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request accepted. Check the returned status resource until complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "job_id": "11111111-1111-4111-8111-111111111111",
                      "status": "queued",
                      "status_url": "/api/v1/jobs/11111111-1111-4111-8111-111111111111"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_NOT_READY",
                      "error": "MIDI upload verification is not complete"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_UNSUPPORTED",
                      "error": "The selected MIDI asset was rejected."
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/midi/intents": {
      "post": {
        "operationId": "midiIntent",
        "description": "Create a MIDI project and register the score to upload. Reuse request_id and the same file declaration to recover the registration or refresh a pending upload URL.",
        "responses": {
          "201": {
            "description": "Registration succeeded. Save the returned identifiers and any upload instructions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIIntent"
                },
                "examples": {
                  "example": {
                    "value": {
                      "project_id": "11111111-1111-4111-8111-111111111111",
                      "asset": {
                        "id": "11111111-1111-4111-8111-111111111111",
                        "filename": "score.mid",
                        "content_type": "audio/midi",
                        "size_bytes": 35,
                        "status": "awaiting_upload",
                        "created_at": "2026-11-14T00:00:00Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request rejected or service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "CONFLICT",
                      "error": "Generation already requested for this project"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MIDIRegistration"
              },
              "examples": {
                "valid": {
                  "value": {
                    "request_id": "11111111-1111-4111-8111-111111111111",
                    "filename": "score.mid",
                    "content_type": "audio/midi",
                    "size_bytes": 35
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/intents/{project_id}/midi-assets": {
      "parameters": [
        {
          "in": "path",
          "name": "project_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "operationId": "registerMIDIAsset",
        "description": "Register another MIDI asset in an existing project and obtain its upload instructions.",
        "responses": {
          "201": {
            "description": "Registration succeeded. Save the returned identifiers and any upload instructions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDICreated"
                },
                "examples": {
                  "example": {
                    "value": {
                      "asset": {
                        "id": "11111111-1111-4111-8111-111111111111",
                        "filename": "score.mid",
                        "content_type": "audio/midi",
                        "size_bytes": 35,
                        "status": "awaiting_upload",
                        "created_at": "2026-11-14T00:00:00Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_MIDI_ASSET"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_NOT_FOUND"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_CONFLICT"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_UNAVAILABLE"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MIDIRegistration"
              },
              "examples": {
                "valid": {
                  "value": {
                    "request_id": "11111111-1111-4111-8111-111111111111",
                    "filename": "score.mid",
                    "content_type": "audio/midi",
                    "size_bytes": 35
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/intents/{project_id}/midi-assets/{asset_id}": {
      "parameters": [
        {
          "in": "path",
          "name": "project_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "asset_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "readMIDIAsset",
        "description": "Read MIDI readiness and any rejection reason. Wait for status ready before conversion.",
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIAsset"
                },
                "examples": {
                  "example": {
                    "value": {
                      "id": "11111111-1111-4111-8111-111111111111",
                      "filename": "score.mid",
                      "content_type": "audio/midi",
                      "size_bytes": 35,
                      "status": "awaiting_upload",
                      "created_at": "2026-11-14T00:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_MIDI_ASSET"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_NOT_FOUND"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_CONFLICT"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_UNAVAILABLE"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/intents/{project_id}/midi-assets/{asset_id}/complete": {
      "parameters": [
        {
          "in": "path",
          "name": "project_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "asset_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "operationId": "completeMIDIUpload",
        "description": "Finish uploading a MIDI file and request its verification. Send an empty body, not an empty JSON object. Returns 202 while pending, or 200 when ready or rejected.",
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIAsset"
                },
                "examples": {
                  "example": {
                    "value": {
                      "id": "11111111-1111-4111-8111-111111111111",
                      "filename": "score.mid",
                      "content_type": "audio/midi",
                      "size_bytes": 35,
                      "status": "verifying",
                      "created_at": "2026-11-14T00:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Request accepted. Check the returned status resource until complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIAsset"
                },
                "examples": {
                  "example": {
                    "value": {
                      "id": "11111111-1111-4111-8111-111111111111",
                      "filename": "score.mid",
                      "content_type": "audio/midi",
                      "size_bytes": 35,
                      "status": "verifying",
                      "created_at": "2026-11-14T00:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_MIDI_ASSET"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_NOT_FOUND"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Public MIDI result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_CONFLICT"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. RATE_LIMIT_UNAVAILABLE means the request could not be accepted. Preserve the original request and identifiers when retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MIDIError"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "MIDI_ASSET_UNAVAILABLE"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "operationId": "getIdentity",
        "summary": "Read authenticated user",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                },
                "example": {
                  "id": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/credits": {
      "get": {
        "operationId": "getCredits",
        "summary": "Read credit balance",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Request succeeded. Read the response for the current status or result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credits"
                },
                "example": {
                  "balance_credits": 1000,
                  "reserved_credits": 0,
                  "available_credits": 1000
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/music/download": {
      "post": {
        "operationId": "downloadMusic",
        "description": "Get a signed full-mix URL for an owned API project and saved version. Returns an existing WAV or MP3, or exports a supported WAV result to MP3 while preserving the original. No new music, version or credit charge. MP3-to-WAV conversion and stem exports are unsupported. Synchronous; allow up to 25 minutes for a new export. Repeat the same project, version and format to recover or refresh the 15-minute URL; no Idempotency-Key is required. Account-shared rate allowance: 120 requests/minute, burst 30.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadRequest"
              },
              "example": {
                "project_id": "11111111-1111-4111-8111-111111111111",
                "music_version_id": "44444444-4444-4444-8444-444444444444",
                "audio_format": "mp3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Download URL ready. This is a synchronous response, not a job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Download"
                },
                "example": {
                  "url": "https://example.com/your-temporary-mp3-download",
                  "expires_at": "2026-11-17T12:15:00Z"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "INVALID_REQUEST",
                      "error": "Invalid public music request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAUTHORIZED",
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Project/version not found for this account, or requested format unavailable for this version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "NOT_FOUND",
                      "error": "Resource not found"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request rejected or unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "value": {
                      "code": "UNAVAILABLE",
                      "error": "Public music operation unavailable"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit reached. Wait at least Retry-After seconds before repeating the same request.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                },
                "example": {
                  "code": "RATE_LIMITED",
                  "error": "Too many requests. Try again shortly.",
                  "retry_after": 4
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "User API key. Trusted services use the existing authenticated service/tenant boundary."
      }
    },
    "schemas": {
      "File": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "filename": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "filename",
          "content_type",
          "size_bytes"
        ]
      },
      "Input": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "text_prompt",
                  "musical_direction",
                  "script"
                ]
              },
              "representation": {
                "type": "string",
                "enum": [
                  "text"
                ]
              },
              "text_content": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S",
                "maxLength": 100000
              }
            },
            "required": [
              "kind",
              "representation",
              "text_content"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "video",
                  "script"
                ]
              },
              "representation": {
                "type": "string",
                "enum": [
                  "file"
                ]
              },
              "file": {
                "$ref": "#/components/schemas/File"
              }
            },
            "required": [
              "kind",
              "representation",
              "file"
            ]
          }
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "kind": {
                  "enum": [
                    "text_prompt",
                    "musical_direction"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "text_content": {
                  "maxLength": 8000
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "const": "video"
                },
                "representation": {
                  "const": "file"
                }
              }
            },
            "then": {
              "properties": {
                "file": {
                  "properties": {
                    "size_bytes": {
                      "maximum": 262144000
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "const": "script"
                },
                "representation": {
                  "const": "file"
                }
              }
            },
            "then": {
              "properties": {
                "file": {
                  "properties": {
                    "size_bytes": {
                      "maximum": 20971520
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "IntentRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "duration_sec": {
            "type": "number",
            "minimum": 10,
            "maximum": 240,
            "default": 30
          },
          "inputs": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/Input"
            },
            "allOf": [
              {
                "contains": {
                  "properties": {
                    "kind": {
                      "const": "video"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "minContains": 0,
                "maxContains": 1
              },
              {
                "contains": {
                  "properties": {
                    "kind": {
                      "const": "script"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "minContains": 0,
                "maxContains": 1
              }
            ]
          }
        },
        "required": [
          "inputs"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "inputs": {
                  "contains": {
                    "properties": {
                      "kind": {
                        "const": "text_prompt"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  }
                }
              }
            },
            "then": {
              "properties": {
                "inputs": {
                  "maxItems": 1
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "inputs": {
                  "contains": {
                    "properties": {
                      "kind": {
                        "const": "video"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  }
                }
              }
            },
            "then": {
              "not": {
                "required": [
                  "duration_sec"
                ]
              }
            }
          }
        ]
      },
      "Upload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "input_id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "method": {
            "type": "string",
            "enum": [
              "PUT"
            ]
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "input_id",
          "url",
          "method",
          "headers",
          "expires_at"
        ]
      },
      "Intent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "uploads": {
            "description": "One entry per file declaration in request input order; text inputs are skipped.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Upload"
            }
          },
          "arrived_input_ids": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Matching objects observed by refresh; not accepted receipts or verification evidence."
          }
        },
        "required": [
          "project_id",
          "uploads"
        ]
      },
      "GenerateRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "audio_format": {
            "type": "string",
            "enum": [
              "wav",
              "mp3"
            ],
            "default": "wav"
          }
        },
        "required": [
          "project_id"
        ]
      },
      "RefineRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "music_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "instruction": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "audio_format": {
            "type": "string",
            "enum": [
              "wav",
              "mp3"
            ],
            "default": "wav"
          }
        },
        "required": [
          "project_id",
          "music_version_id",
          "instruction"
        ]
      },
      "Accepted": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued"
            ]
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "job_id",
          "status",
          "status_url"
        ]
      },
      "Artifact": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "artifact_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "full_mix",
              "stem"
            ]
          },
          "track_key": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "artifact_id",
          "kind",
          "url",
          "expires_at"
        ]
      },
      "Result": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "music_id": {
            "type": "string",
            "format": "uuid"
          },
          "music_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "generated",
              "changed",
              "unchanged",
              "unsupported"
            ]
          },
          "explanation": {
            "type": "string"
          },
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Artifact"
            }
          }
        },
        "required": [
          "music_id",
          "music_version_id",
          "outcome",
          "artifacts"
        ]
      },
      "Failure": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "required": [
          "code"
        ]
      },
      "Job": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "operation": {
            "type": "string",
            "enum": [
              "generate",
              "refine"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "stage": {
            "type": "string",
            "description": "Progress label for display. Use status, rather than stage, to determine completion."
          },
          "result": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Result"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Failure"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "job_id",
          "project_id",
          "operation",
          "status",
          "stage",
          "result",
          "error"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "succeeded"
                }
              }
            },
            "then": {
              "properties": {
                "result": {
                  "$ref": "#/components/schemas/Result"
                },
                "error": {
                  "type": "null"
                },
                "stage": {
                  "const": "completed"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "const": "failed"
                }
              }
            },
            "then": {
              "properties": {
                "error": {
                  "$ref": "#/components/schemas/Failure"
                },
                "result": {
                  "type": "null"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "enum": [
                    "queued",
                    "running"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "error": {
                  "type": "null"
                },
                "result": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "PreparationReadiness": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "project_id",
          "state",
          "inputs"
        ],
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "awaiting_upload",
              "checking",
              "ready",
              "failed"
            ]
          },
          "inputs": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "input_id",
                "state"
              ],
              "properties": {
                "input_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "awaiting_upload",
                    "checking",
                    "ready",
                    "failed"
                  ]
                }
              }
            }
          },
          "error": {
            "type": "string"
          }
        }
      },
      "TextRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "duration_sec": {
            "type": "number",
            "minimum": 10,
            "maximum": 240
          },
          "audio_format": {
            "type": "string",
            "enum": [
              "wav",
              "mp3"
            ],
            "default": "wav"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "MIDIRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "midi_asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "caption": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[^\\r\\n\\u0000]+$",
            "description": "Desired sound in one nonblank line, at most 256 characters. Describe style, instruments and mood; the MIDI file supplies notes and timing."
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "audio_format": {
            "type": "string",
            "enum": [
              "wav",
              "mp3"
            ],
            "default": "wav"
          }
        },
        "required": [
          "project_id",
          "midi_asset_id",
          "caption",
          "seed"
        ]
      },
      "MIDIRegistration": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "\\.[mM][iI][dD]([iI])?$"
          },
          "content_type": {
            "type": "string",
            "enum": [
              "audio/midi",
              "audio/x-midi",
              "application/x-midi"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 14,
            "maximum": 16777216
          }
        },
        "required": [
          "request_id",
          "filename",
          "content_type",
          "size_bytes"
        ]
      },
      "MIDIAsset": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "status": {
            "enum": [
              "awaiting_upload",
              "verifying",
              "ready",
              "rejected"
            ]
          },
          "inspection": {
            "type": "object",
            "description": "Information about the checked score, including duration_ms (milliseconds), parts, tempos, meters and warnings."
          },
          "error": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "filename",
          "content_type",
          "size_bytes",
          "status",
          "created_at"
        ]
      },
      "MIDIUpload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "url",
          "expires_at",
          "headers"
        ]
      },
      "MIDICreated": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/MIDIAsset"
          },
          "upload": {
            "$ref": "#/components/schemas/MIDIUpload"
          }
        },
        "required": [
          "asset"
        ]
      },
      "MIDIIntent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/MIDIAsset"
          },
          "upload": {
            "$ref": "#/components/schemas/MIDIUpload"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "asset",
          "project_id"
        ]
      },
      "MIDIError": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [],
        "anyOf": [
          {
            "required": [
              "code"
            ]
          },
          {
            "required": [
              "error"
            ]
          }
        ]
      },
      "Identity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Credits": {
        "type": "object",
        "properties": {
          "balance_credits": {
            "type": "integer"
          },
          "reserved_credits": {
            "type": "integer"
          },
          "available_credits": {
            "type": "integer"
          }
        },
        "required": [
          "balance_credits",
          "reserved_credits",
          "available_credits"
        ],
        "additionalProperties": true
      },
      "RateLimited": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "const": "RATE_LIMITED"
          },
          "error": {
            "type": "string"
          },
          "retry_after": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "code",
          "error",
          "retry_after"
        ]
      },
      "DownloadRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "not": {
              "const": "00000000-0000-0000-0000-000000000000"
            },
            "description": "An API project owned by the authenticated account."
          },
          "music_version_id": {
            "type": "string",
            "format": "uuid",
            "not": {
              "const": "00000000-0000-0000-0000-000000000000"
            },
            "description": "A saved music version in that project."
          },
          "audio_format": {
            "type": "string",
            "enum": [
              "wav",
              "mp3"
            ],
            "description": "Required; no default. Request an existing format or export a supported WAV result to MP3."
          }
        },
        "required": [
          "project_id",
          "music_version_id",
          "audio_format"
        ]
      },
      "Download": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Private signed download URL. Fetch without an API key."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "URL expiry, 15 minutes after issuance."
          }
        },
        "required": [
          "url",
          "expires_at"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.taan.ai"
    }
  ]
}
