Enrich content
This recipe shows you how to apply a domain-specific lens to your videos and images and receive structured, targeted analysis. The response includes per-item enrichments with domain-specific insights and tags, ready for your content pipeline or metadata system.
Use cases:
- Brand analysis: Evaluate brand messaging, audience engagement, and production quality across videos and images
- Accessibility audits: Describe visual elements for screen readers, assess caption quality, and identify audio-only content
- Compliance reviews: Identify claims, disclaimers, and required disclosures in your content
- SEO metadata extraction: Generate keywords, descriptions, titles, and topic clusters from your content
Key concepts
- Knowledge store: A persistent store of your videos and images plus the understanding the platform derives from them — spatiotemporal context, a typed ontology, and embeddings — that together enable corpus-level reasoning.
- Instructions: Additional guidance that shapes Jockey’s behavior for a specific domain or task.
- Structured output: A JSON schema you provide with your request. Jockey constrains its output to match your schema, so you retrieve machine-readable results instead of plain text. For a guide on designing schemas and parsing responses, see the Structured output page.
Workflow
This recipe combines three elements: a JSON schema that defines the enrichment data structure, instructions that give Jockey a specific role and domain guidance, and a prompt that describes what analysis you want. Jockey reasons across your knowledge store, finds relevant content, and returns structured results that match your schema. You can adapt this recipe to analyze content through a different domain lens.
Prerequisites
- You’ve already created a knowledge store with at least one item in
readystatus. See the Quickstart page for details. - You’re familiar with the request and response format. See the Create a response page for details.
Complete example
Copy and paste the code below, replacing the placeholders surrounded by <> with your values.
Code explanation
Python
Node.js
To enrich your content through a domain lens, call the responses.create method with domain instructions, a prompt, and a text parameter that describes your result schema.
Parameters:
knowledge_store_id: The unique identifier of the knowledge store to reason over.input: An array of input items. Each item is a message you send to Jockey. This example requests enriched analysis of brand messaging effectiveness, audience engagement signals, and production quality.instructions: A per-request system prompt that shapes Jockey’s behavior for a domain or task. This example uses a brand strategist role focused on brand perception and marketing effectiveness.text: An object that specifies the response format. To return structured JSON, set theformatfield: itsschema_field defines the structure the output must match, and itsnamefield identifies the schema. Design the schema to fit your use case; the inline comments in the example describe each field. For the schema rules, see the Structured output page.
Return value: An object of type ResponseObject containing, among other information, the following fields:
id: The unique identifier of the response.knowledge_store_id: The knowledge store this response was generated against.session_id: The session identifier. Pass it in a follow-up request to continue the conversation.status: The status of the response. The possible values arecompleted,failed,in_progress, andincomplete.output: The response output items. Thetextfield of each content part in amessageitem is a JSON string that matches your schema. Parse it withjson.loads(), then iterate theenrichmentsarray to read each video’s analysis.usage: Token usage statistics, including theinput_tokensandoutput_tokensfields.
Example response
The text field inside each content part is a JSON string that matches your schema. After parsing, a typical result looks like this:
Note
The original_summary field is populated from the summary the platform generated when the video was indexed.
Variations
Change the instructions and prompt to adapt this recipe for different domains and analysis types.
- Change the domain lens: Set the
instructionsparameter to a different analytical perspective. The schema stays the same.- Accessibility: “Analyze for accessibility: describe visual elements for screen readers, note caption quality, identify audio-only content.”
- Compliance: “Review for regulatory compliance: identify claims, disclaimers, required disclosures.”
- Education: “Analyze pedagogical effectiveness: identify learning objectives, teaching methods, assessment opportunities.”
- SEO: “Extract SEO metadata: keywords, descriptions, suggested titles, topic clusters.”
- Run a comparative analysis: Set the instructions to “Enrich by comparing each video to the collection average.”
- Find coverage gaps: Ask “What aspects of these videos and images are under-documented?” to identify areas that need deeper analysis.
- Target a specific audience: Change the instructions to enrich for different target audiences, such as executives, students, or technical reviewers.
Jupyter notebook
See also
- Structured output - more on JSON Schema responses
- Configure ingestion - configure extraction at index time instead of at response time
- Create a response - API reference for the Responses endpoint