Configure ingestion
Ingestion configuration is optional. If omitted, Jockey uses the default extraction. Configure ingestion when you know what to extract. It helps Jockey emphasize the right signals and produce more reliable extraction.
Choose the approach that fits your use case:
- Default (no configuration): No setup required. Use it for getting started or quick prototyping.
- Natural language description: Describe what to extract in plain language. Use it when you know the domain but not the exact fields.
- JSON Schema: Define the exact fields and types to extract. Use it when downstream code expects specific typed fields.
Natural language description
Use this approach for exploratory work when you don’t yet know the exact fields you need.
Example
The following example focuses extraction on brand mentions, product appearances, audience reactions, and visual tone. Copy and paste the code below, replacing the placeholders surrounded by <> with your values.
Code explanation
Python
Node.js
To configure ingestion with a natural-language description, pass an ingestion_config to the knowledge_stores.create method.
Parameters:
ingestion_config: An object that configures what the platform extracts during indexing. It contains anenrichment_configobject with the following properties:type: The enrichment type. Set to"description".description: Natural-language instructions. Jockey interprets your description to guide extraction.
Return value: An object of type KnowledgeStore with a field named id representing the unique identifier of the newly created knowledge store.
JSON Schema
Use this approach when downstream code expects specific typed fields.
Example
The following example extracts metadata about people, locations, and activities from each video shot. Copy and paste the code below, replacing the placeholders surrounded by <> with your values.
Code explanation
Python
Node.js
To configure ingestion with a JSON Schema, pass an ingestion_config to the knowledge_stores.create method.
Parameters:
ingestion_config: An object that configures what the platform extracts during indexing. It contains anenrichment_configobject with the following properties:type: The enrichment type. Set to"json_schema".json_schema: A JSON Schema (draft 2020-12). The roottypekeyword must be"object". See the JSON Schema keywords section for the accepted keywords.
Return value: An object of type KnowledgeStore with a field named id representing the unique identifier of the newly created knowledge store.
JSON Schema keywords
Note
The constraints in this section apply only to ingestion. The schema for the structured output feature of the Responses API supports a different set of keywords, and unsupported keywords do not return an error. They produce incomplete or malformed output.
The platform accepts the following JSON Schema keywords:
Notes:
- Include a
descriptionfield in every property. The platform uses this text to guide extraction, and omitting it returns a422error. - Use the
requiredkeyword to specify which fields must appear in every result. - Set the
additionalPropertieskeyword totrueorfalseto control strict shapes. - Do not use nullable fields. To make a field optional, omit it from the
requiredarray. - Do not include unknown keywords. The platform rejects them with a
422error.
Not supported
The platform does not support the following JSON Schema keywords:
- Schema composition:
anyOf,allOf,oneOf,not - Conditional schemas:
if/then/else - Property dependencies:
dependentSchemas,dependentRequired - Object size constraints:
minProperties,maxProperties - String constraints:
pattern,minLength,maxLength - Number constraints:
exclusiveMinimum,exclusiveMaximum,multipleOf - Value constraints:
const - Null handling:
nullable,typearrays (e.g.,["string", "null"]) - Annotative keywords:
default,examples,readOnly,writeOnly - References and reuse:
$ref,$defs,definitions
Common pitfalls
- Overly specific schemas can limit extraction. If the schema is too specific, Jockey may miss relevant content. Start broad, then narrow the schema as you learn what you need.
- General descriptions can lead to broad extraction. If the description is too general, Jockey may return results that are broader than you need. Name the fields, entities, or patterns you want Jockey to emphasize.
- Programmatically generated schemas may include unsupported keywords. If you use tools like
pydantic.model_json_schema(), the output may contain annotative keywords such asdefault,examples, andreadOnly. Strip these before submitting. The platform rejects unknown keywords with a422error.