{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/civai-co/json-schema/civai-co-publish-request-schema.json",
  "title": "PublishRequest",
  "description": "Request model for publishing.\n\nA single platform/account_id still works. Send `targets` instead to publish\nthe same asset to several accounts (e.g. TikTok and Instagram) in one call.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/civai-co-publisher-publishing-api-openapi.yml#/components/schemas/PublishRequest",
  "properties": {
    "platform": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    },
    "account_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Account Id"
    },
    "post_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Post Type",
      "default": "reel"
    },
    "caption": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Caption"
    },
    "scheduled_time": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Scheduled Time"
    },
    "photo": {
      "type": "boolean",
      "title": "Photo",
      "default": false
    },
    "duration": {
      "type": "integer",
      "title": "Duration",
      "default": 5
    },
    "link_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Link Url"
    },
    "targets": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/PublishTarget"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Targets"
    }
  },
  "type": "object",
  "$defs": {
    "PublishTarget": {
      "properties": {
        "platform": {
          "type": "string",
          "title": "Platform"
        },
        "account_id": {
          "type": "string",
          "title": "Account Id"
        },
        "post_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Post Type"
        },
        "caption": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Caption"
        },
        "photo": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Photo"
        },
        "duration": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration"
        }
      },
      "type": "object",
      "required": [
        "platform",
        "account_id"
      ],
      "title": "PublishTarget",
      "description": "One platform/account pair an asset should be published to."
    }
  }
}