Audience: Engineers integrating Jay on Web, iOS, Android, and backend services. Outcome: A ready-to-code environment with curated links (llms.txt, sitemaps), headers/env presets, and copy‑paste prompt recipes for high‑quality results.
Centralize the links and conventions that AI tools rely on (e.g., llms.txt, sitemaps, OpenAPI) and provide prompt recipes tuned for our stack (TypeScript/Angular, Node, Swift, Kotlin).
These are the first destinations for developers and AI assistants. Include them in your llms.txt.
- Docs Home:
https://docs.jay-metadata.com/ - Docs Sitemap (HTML):
https://docs.jay-metadata.com/sitemap - XML Sitemap:
https://docs.jay-metadata.com/sitemap.xml - OpenAPI – Playout (Latest):
https://docs.jay-metadata.com/apis/playout/latest/openapi - OpenAPI – Basket v2 (Latest):
https://docs.jay-metadata.com/apis/basket/latest/openapi - Platform How‑Tos Index:
https://docs.jay-metadata.com/platform/how-to - Quickstarts Index:
https://docs.jay-metadata.com/platform/quickstarts - System Overview:
https://docs.jay-metadata.com/introduction/system-overview
Minimal llms.txt
# High-priority docs and machine-readable specs for LLMs
ALLOW: https://docs.jay-metadata.com/
PRIORITY: https://docs.jay-metadata.com/platform/quickstarts/streaming-integration
PRIORITY: https://docs.jay-metadata.com/platform/how-to/fetch-data
PRIORITY: https://docs.jay-metadata.com/platform/how-to/use-the-basket
PRIORITY: https://docs.jay-metadata.com/platform/how-to/checkout-stripe
PRIORITY: https://docs.jay-metadata.com/apis/playout/latest/openapi
PRIORITY: https://docs.jay-metadata.com/apis/basket/latest/openapi
SITEMAP: https://docs.jay-metadata.com/sitemap.xmlKeep this list short and canonical.
- Extensions: ESLint, Prettier, REST Client or Thunder Client, EditorConfig, GitLens.
- Settings: format on save, organize imports on save, 2‑space indent.
- Snippets: add project snippets for common headers and fetch patterns (see below).
- REST Client: store
.httpfiles with ready calls (Playout episodes, Basket product details, checkout start/finish). - Postman/Insomnia: import the shared collection with environments for Stage/Prod.
Create scripts/api with simple curl wrappers:
# scripts/api/episodes.sh
curl -sS \
-H "X-API-Key: $JAY_API_KEY" \
-H "X-API-Version: ${JAY_PLAYOUT_VER:-2025-09-02}" \
-H "__Secure-jay_tracking: ${JAY_TRACKING:-local-dev}" \
"https://live.playout.api.jay-metadata.com/v1/playouts/$1/episodes" | jq ..env (local)
JAY_API_KEY=xxx
JAY_PLAYOUT_ID=xxx
JAY_PLAYOUT_VER=2025-09-02
JAY_BASKET_VER=2025-09-15
JAY_TRACKING=local-devDefault headers
X-API-Key: ${JAY_API_KEY}
X-API-Version: ${JAY_PLAYOUT_VER} # Playout
__Secure-jay_tracking: ${JAY_TRACKING}
Authorization: Bearer <jwt> # Basket onlyPin versions in CI/CD. Use a cookie or the header for
__Secure-jay_trackingper request.
You are an expert assistant for Jay’s streaming integration stack.
Always prefer the company docs provided via llms.txt and sitemaps.
Constrain answers to the Playout API (content/structure) and Basket API v2 (cart/checkout).
When showing code, use TypeScript fetch examples and include required headers:
- X-API-Key, X-API-Version (pinned), and __Secure-jay_tracking (cookie or header) for Playout
- X-API-Key, X-API-Version, and Authorization: Bearer <jwt> for Basket
Before write access, verify availability via POST /baskets/products/details.
If endpoint shape is uncertain, link to the exact reference page.
Keep answers concise, deterministic, and copy‑pasteable.Using the sources in llms.txt and sitemap.xml, find the latest Basket API v2 reference for
starting and finishing a checkout session. Return:
1) Exact endpoints and required headers
2) Minimal request bodies
3) Expected success responses and common errors
4) Links to the specific sections in the docsGenerate an Angular Injectable service `PlayoutService` with methods:
- createTrackingSession()
- listEpisodes(playoutId)
- getEpisode(playoutId, episodeId)
- listGroups(playoutId, episodeId)
- listScenes(playoutId, episodeId)
- listTimelineEvents(playoutId, episodeId)
Use HttpClient. Set default headers (X-API-Key from env token provider, X-API-Version pinned, send
__Secure-jay_tracking cookie when available, else header). Provide strict typings (interfaces) and
handle non-200 with typed errors.Create an Angular HttpInterceptor that injects the following headers when the URL matches
`*.playout.api.jay-metadata.com` or `*.basket.api.jay-metadata.com`:
- X-API-Key from a ConfigService
- X-API-Version per-domain (playout vs basket)
- For Playout: if cookie `__Secure-jay_tracking` is absent, add header with value from a TrackingService
- For Basket: add Authorization: Bearer <jwt> if available
Make it configurable for SSR vs browser.Write TypeScript functions to:
1) Create a guest basket → returns { userId, jwt }
2) Check product details via POST /baskets/products/details for a list of basketProductIds
3) Add first available product to the basket
4) Start a checkout session and return Stripe client_secret
5) Finalize the active checkout session
Include error handling for stock changes and a locked basket during checkout.Refactor the following TypeScript to be production‑ready:
- Strong typings for API responses
- Runtime validation (zod) for external responses
- Centralized error formatting with error codes and actionable messages
- Retries with exponential backoff for 5xx and network errors
- Idempotent POSTs where appropriate
- Unit tests with Vitest for the functionsGiven a failing Basket checkout:
- Inspect for missing Authorization or expired JWT
- Check if the basket is locked due to an active checkout session
- Verify product variants and stock via /baskets/products/details
- Reconcile X-API-Version mismatches between client and server
- Provide specific curl repro commands and link to reference sections- Cite the docs: link back to specific reference sections.
- No hallucinated endpoints: if uncertain, ask for the canonical reference link.
- Version discipline: always pin
X-API-Versionand surface the value used in snippets. - Privacy: never log secrets (
X-API-Key, JWTs). Use redaction in samples. - Test mode: prefer
mode: "test"and test tokens for payment flows unless explicitly disabled.
-
llms.txtlists the latest quickstarts/how‑tos and OpenAPI links - Postman/Insomnia collections exported and linked from docs
- Env/header examples validated against Prod
- Sample prompts resolve to correct endpoints and headers
- Angular interceptor/service compile in a minimal project
- 2025‑10‑01: Initial version (setup, curated links, prompts A–G).