VectorMethods

Docs / API reference

Prompts

Create, update, validate, inspect, and delete VideoVector prompts, including video-level synthesis and semantic indexing controls.

api/routes.pysdk/videovector/resources/prompts.pymcp-server/src/tools/definitions.ts

Search documentation

Search pages, API reference sections, and guide headings.

Summary

Prompts define the extraction contract. The public API supports prompt CRUD, schema testing, usage inspection, and prompt-definition draft generation.

Prompt endpoints

MethodPathPurpose
POST/api/v2/promptsCreate a prompt
GET/api/v2/promptsList prompts
GET/api/v2/prompts/{prompt_id}Retrieve one prompt
PUT/api/v2/prompts/{prompt_id}Replace selected prompt fields
DELETE/api/v2/prompts/{prompt_id}Delete or deactivate a prompt
POST/api/v2/prompts/test-schemaValidate sample data against a schema
GET/api/v2/prompts/{prompt_id}/usageInspect usage and safety-to-delete signals
POST/api/v2/prompts/generateGenerate a draft prompt definition for the creation flow

Request shape

Public prompt creation supports these top-level fields:

FieldTypeNotes
namestringHuman-readable prompt name
descriptionstringOptional description
prompt_textstringInstructions for extraction
json_schemaobjectSegment-level JSON Schema
video_levelobjectOptional media-wide synthesis contract
semantic_indexingobjectOptional per-field semantic indexing controls

Example: create a prompt

curl -X POST /api/v2/prompts \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: prompt-create-scene-v1" \
  -d '{
    "name": "Scene extractor",
    "description": "Extract structured scene evidence per segment.",
    "prompt_text": "Extract the requested fields from this media segment.",
    "json_schema": {
      "type": "object",
      "properties": {
        "headline": { "type": "string" },
        "scene": {
          "type": "object",
          "properties": {
            "location": { "type": "string" },
            "people": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": { "type": "string" },
                  "emotion": { "type": "string" }
                }
              }
            }
          }
        }
      }
    },
    "video_level": {
      "instructions_text": "Summarize the entire asset from the extracted segment evidence.",
      "included_segment_fields": ["headline", "scene.location", "transcription"],
      "json_schema": {
        "type": "object",
        "properties": {
          "program_summary": { "type": "string" }
        }
      }
    },
    "semantic_indexing": {
      "disabled_segment_fields": [],
      "disabled_video_level_fields": []
    }
  }'

Schema validation

Use /api/v2/prompts/test-schema before saving a production contract.

curl -X POST /api/v2/prompts/test-schema \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "json_schema": {
      "type": "object",
      "properties": {
        "headline": { "type": "string" }
      }
    },
    "sample_data": {
      "headline": "Reporter outside station"
    }
  }'

Update semantics

PUT /api/v2/prompts/{prompt_id} supports partial replacement of documented prompt fields. Public update behavior includes:

  • replacing prompt_text
  • replacing json_schema
  • replacing video_level
  • replacing semantic_indexing
  • clearing video_level with clear_video_level: true

Legacy index prompt attachment

The route /api/v2/indexes/{index_id}/prompt still exists, but the route implementation explicitly warns that index-level prompt attachment is deprecated. New integrations should execute prompts through prompt runs.

SDK equivalents

  • client.prompts.create
  • client.prompts.update
  • client.prompts.test_schema
  • client.prompts.get_usage

Related documentation

Prompt schemas define what gets extracted, what becomes searchable, and what can be reused in video-level synthesis. This page covers the public schema rules and field-path conventions.

This guide shows how to define a prompt with nested and repeated fields, validate the schema, and keep the output shape usable for search and filtering.

API reference

Prompt runs are the execution boundary for extraction. The API exposes run creation, status inspection, cancellation, segment results, media-wide synthesis, failed-segment manifests, and debug-oriented LLM call access.