post/api/v2/content/create

Create or optimize a content document with the local content workflow.

Create or optimize a content document with the local content workflow.

Requires bearer API key

Parameters

X-Project-Id

header

Required for organization-wide API keys on project-scoped endpoints. Project-scoped keys infer the project automatically.

Schema: string

Request Body

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "CREATE",
        "OPTIMIZE"
      ]
    },
    "promptId": {
      "type": "string"
    },
    "personaId": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "ARTICLE",
        "BLOG_POST",
        "PRODUCT_PAGE",
        "GENERIC_CONTENT",
        "LISTICLE",
        "PRODUCT_COMPARISON"
      ]
    },
    "contentLength": {
      "type": "string",
      "enum": [
        "SHORT",
        "MEDIUM",
        "LONG"
      ]
    },
    "optimizationLevel": {
      "type": "string",
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH"
      ]
    },
    "url": {
      "type": "string"
    },
    "contentGapRecommendationId": {
      "type": "string"
    },
    "toneOfVoice": {
      "type": "string",
      "enum": [
        "PROFESSIONAL",
        "CASUAL",
        "TECHNICAL",
        "CONVERSATIONAL",
        "NEUTRAL",
        "AUTHORITATIVE",
        "FRIENDLY",
        "PERSUASIVE",
        "FORMAL",
        "WITTY",
        "CUSTOM"
      ]
    },
    "customToneOfVoice": {
      "type": "string"
    },
    "languageCode": {
      "type": "string"
    },
    "imageArtisticStyle": {
      "type": "string"
    },
    "imagePromptInstructions": {
      "type": "string"
    },
    "blockedWords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "mode",
    "promptId",
    "personaId"
  ],
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "CREATE"
          ]
        },
        "promptId": {
          "type": "string"
        },
        "personaId": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "ARTICLE",
            "BLOG_POST",
            "PRODUCT_PAGE",
            "GENERIC_CONTENT",
            "LISTICLE",
            "PRODUCT_COMPARISON"
          ]
        },
        "contentLength": {
          "type": "string",
          "enum": [
            "SHORT",
            "MEDIUM",
            "LONG"
          ]
        },
        "contentGapRecommendationId": {
          "type": "string"
        },
        "toneOfVoice": {
          "type": "string",
          "enum": [
            "PROFESSIONAL",
            "CASUAL",
            "TECHNICAL",
            "CONVERSATIONAL",
            "NEUTRAL",
            "AUTHORITATIVE",
            "FRIENDLY",
            "PERSUASIVE",
            "FORMAL",
            "WITTY",
            "CUSTOM"
          ]
        },
        "customToneOfVoice": {
          "type": "string"
        },
        "languageCode": {
          "type": "string"
        },
        "imageArtisticStyle": {
          "type": "string"
        },
        "imagePromptInstructions": {
          "type": "string"
        },
        "blockedWords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "mode",
        "promptId",
        "personaId"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "OPTIMIZE"
          ]
        },
        "promptId": {
          "type": "string"
        },
        "personaId": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "optimizationLevel": {
          "type": "string",
          "enum": [
            "LOW",
            "MEDIUM",
            "HIGH"
          ]
        },
        "contentGapRecommendationId": {
          "type": "string"
        },
        "toneOfVoice": {
          "type": "string",
          "enum": [
            "PROFESSIONAL",
            "CASUAL",
            "TECHNICAL",
            "CONVERSATIONAL",
            "NEUTRAL",
            "AUTHORITATIVE",
            "FRIENDLY",
            "PERSUASIVE",
            "FORMAL",
            "WITTY",
            "CUSTOM"
          ]
        },
        "customToneOfVoice": {
          "type": "string"
        },
        "languageCode": {
          "type": "string"
        },
        "imageArtisticStyle": {
          "type": "string"
        },
        "imagePromptInstructions": {
          "type": "string"
        },
        "blockedWords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "mode",
        "promptId",
        "personaId",
        "url",
        "optimizationLevel"
      ]
    }
  ]
}

Responses

201

Content document created.

application/json
{
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "status"
  ]
}

Try it

Send this request to the local WatchLLM REST handler. Use a key from `/workspace/api`; organization keys can include `X-Project-Id` only when the endpoint documents that header.