{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craftstory-com/json-schema/craftstory-com-music-schema.json",
  "title": "Music",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craftstory-com-music-api-openapi.yml#/components/schemas/Music",
  "required": [
    "prompt",
    "duration_s",
    "credits"
  ],
  "type": "object",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "name": {
      "title": "Name",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 512
    },
    "status": {
      "title": "Status",
      "type": "string",
      "enum": [
        "created",
        "in_progress",
        "done",
        "failed"
      ]
    },
    "status_failed": {
      "title": "Status failed",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "rejected_prompt",
        "failed_generation",
        null
      ]
    },
    "status_percentage": {
      "title": "Status percentage",
      "type": "integer",
      "readOnly": true
    },
    "credits_refunded": {
      "title": "Credits refunded",
      "type": "boolean",
      "readOnly": true
    },
    "prompt": {
      "title": "Prompt",
      "type": "string",
      "minLength": 1
    },
    "prompt_suggestion": {
      "title": "Prompt suggestion",
      "type": "string"
    },
    "duration_s": {
      "title": "Requested duration, seconds",
      "type": "integer",
      "maximum": 32767,
      "minimum": 0
    },
    "instrumental": {
      "title": "Instrumental",
      "type": "boolean"
    },
    "credits": {
      "title": "Credits",
      "type": "integer",
      "maximum": 2147483647,
      "minimum": 0
    },
    "audio_url": {
      "title": "Audio url",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "created": {
      "title": "Created",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated": {
      "title": "Updated",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  }
}