{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craftstory-com/json-schema/craftstory-com-craft-story2-create-schema.json",
  "title": "CraftStory2Create",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craftstory-com-openapi.yml#/components/schemas/CraftStory2Create",
  "required": [
    "audios",
    "resolution"
  ],
  "type": "object",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "name": {
      "title": "Name",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 512
    },
    "image": {
      "title": "Image",
      "description": "Driving photo: file upload or URL. Provide image or scene_id (if both, scene_id wins).",
      "type": "string",
      "readOnly": true,
      "format": "uri"
    },
    "scene_id": {
      "title": "Scene id",
      "description": "Avatar scene id (from GET /craftstory-2/avatars/{id}/scenes/); its image becomes the driving frame. Provide scene_id or image (if both, scene_id wins).",
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "audios": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "uniqueItems": true
    },
    "gestures": {
      "title": "Gestures",
      "description": "How much the avatar moves: normal (default), calm, expressive.",
      "type": "string",
      "enum": [
        "normal",
        "calm",
        "expressive"
      ],
      "default": "normal"
    },
    "resolution": {
      "title": "Resolution",
      "description": "Output size WIDTH_HEIGHT: 9:16 / 16:9 at 480p or 720p, or 768_960 for 4:5 portrait (audio under 30 minutes). A 1.5x upscale is available via /upscale/ afterwards.",
      "type": "string",
      "enum": [
        480832,
        832480,
        7201280,
        1280720,
        768960
      ]
    },
    "lipsync_mode": {
      "title": "Lipsync mode",
      "description": "Lipsync engine: sync_so (default, same price), craftstory (built-in), empty (off).",
      "type": "string",
      "enum": [
        "craftstory",
        "sync_so",
        "empty"
      ],
      "default": "sync_so"
    },
    "user_prompt": {
      "title": "User prompt",
      "description": "Optional motion / scene hint in free text (gestures, expressions, camera).",
      "type": "string",
      "maxLength": 1000
    },
    "avatar_id": {
      "title": "Avatar id",
      "description": "Optional custom avatar id (from GET /craftstory-2/avatars/); its trained model drives identity.",
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "faceswap": {
      "title": "Faceswap",
      "description": "Optional — defaults to true (recommended). With avatar_id the default flips to false (the trained avatar already carries identity); an explicit value is honoured either way.",
      "type": "boolean",
      "default": true
    },
    "credits": {
      "title": "Credits",
      "type": "integer",
      "readOnly": true
    }
  }
}