post/api/v2/content-gap/prompts/{promptId}/run

Run content gap analysis for a prompt.

Run content gap analysis for a prompt.

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

promptId

path / required

No description provided.

Schema: string

Responses

200

Successful JSON response.

application/json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string"
    },
    "promptId": {
      "type": "string"
    },
    "projectId": {
      "type": "string"
    },
    "contentCoverageScore": {
      "type": "number"
    },
    "explanation": {
      "type": "string",
      "nullable": true
    },
    "report": {
      "type": "string",
      "nullable": true
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "queryFanouts": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sitemapTotalUrls": {
      "type": "integer",
      "nullable": true
    },
    "sitemapCrawledUrls": {
      "type": "integer",
      "nullable": true
    },
    "queryFanoutsCount": {
      "type": "integer",
      "nullable": true
    },
    "provider": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "providerRunId": {
      "type": "string",
      "nullable": true
    },
    "providerError": {
      "type": "string",
      "nullable": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "recommendations": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "CREATE",
              "OPTIMIZE"
            ]
          },
          "details": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "impact": {
            "type": "string",
            "enum": [
              "HIGH",
              "MEDIUM",
              "LOW"
            ],
            "nullable": true
          },
          "effort": {
            "type": "string",
            "enum": [
              "QUICK_WIN",
              "MODERATE",
              "SIGNIFICANT"
            ],
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "queryFanouts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suggestedSections": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "targetSources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "required": [
          "id",
          "title",
          "action",
          "details",
          "priority",
          "queryFanouts",
          "suggestedSections",
          "targetSources"
        ]
      }
    }
  },
  "required": [
    "id",
    "promptId",
    "projectId",
    "contentCoverageScore",
    "sources",
    "queryFanouts",
    "provider",
    "model",
    "createdAt",
    "recommendations"
  ]
}

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.