Create a response
Generate responses from your video collection through a single API endpoint. Use this guide to generate your first response from a knowledge store, understand the request and response format before moving to advanced features, and customize Jockey’s behavior for a specific domain.
Key concepts
- Knowledge store: A persistent store of your videos plus the understanding the platform derives from them - entities, moments, relationships, and embeddings. All guides in this section assume you have a knowledge store with at least one item in
readystatus. - Response: The object returned by
POST /responses. Contains the generated text, a session ID for follow-up turns, and token usage. - Instructions: A system-level prompt that shapes Jockey’s behavior for a specific domain or task. Same model, same endpoint - different results depending on the instructions you provide.
- Tools: The
toolsarray tells Jockey which knowledge store to reason over. Every request requires exactly oneknowledge_storeentry.
Prerequisites
- You’ve already uploaded your content, and the asset has reached the
readystatus. See the Upload content page for details. - You’ve already created a knowledge store. See the Create a knowledge store page for details.
- You’ve already added at least one asset to the knowledge store, and the item has reached the
readystatus. See the Add assets page for details.
Basic usage
Every interaction with Jockey goes through POST /responses. Provide a natural-language message in the input array and specify the knowledge store to reason over in tools.
The response contains a session_id you can use for follow-up turns (see Multi-turn sessions), an output array with the generated content, and a usage object with token counts:
Customize behavior with instructions
The instructions field is a system-level prompt that specializes Jockey for your domain. Same API, same model - different behavior depending on what you provide.
Swap instructions to reshape Jockey for different contexts:
Read the response
The response object contains metadata, the generated content, and token usage. Use the fields below to extract what you need.
Inspect intermediate outputs
Jockey performs multi-step reasoning internally - searching, analyzing, and synthesizing across your videos. Add "intermediate_outputs" to the include array to see these reasoning steps alongside the final answer. This is useful for debugging or understanding how Jockey arrived at a conclusion.
What you can do
The Responses API handles a wide range of tasks through the same endpoint. These examples are illustrative, not exhaustive.
For complete runnable code, see Recipes.
Common pitfalls
- Knowledge store must have ready items. If no items are
ready, the response has nothing to reason over. - Exactly one tool required. The
toolsarray must contain exactly oneknowledge_storeentry. - Input format matters. Each message needs
type,role, andcontentfields.
Next steps
- Streaming - receive tokens in real time instead of waiting for the full response
- Structured output - get typed JSON back by providing a schema
- Multi-turn sessions - maintain conversation context across requests
Jupyter notebook
Download the notebook to run this guide interactively.