Terminal
Terminal/Skill
Defines reusable post-call data extraction schemas for Vapi calls and runs them to pull typed fields from transcripts.
By Vapi
Works with
npx skills add vapiai/skills --skill create-structured-outputBuild the smallest reusable post-call extraction that represents the user's actual downstream contract. Keep definition creation, assistant attachment, execution, and result retrieval separate: success at one stage does not prove the next stage occurred.
VAPI_API_KEY; never print, request in chat, or embed it in source, client-side code, or examples.compliancePlan.forceStoreOnHipaaEnabled unless the user explicitly requests it and confirms that the output cannot contain PHI or other sensitive data.Choose the output mode.
POST /structured-output only when the user asks to create or save it and credentials are available.structuredOutput to POST /structured-output/run with previewEnabled: true.Define the extraction contract.
Choose AI or regex.
type: "ai" for meaning, classification, summarization, sentiment, outcome detection, normalization, or facts expressed in varied language.type: "regex" only for deterministic transcript matching with a stable pattern. Use RE2-compatible syntax and choose a top-level schema type that matches the documented regex result: boolean, string, number/integer, or array.Design the smallest useful JSON Schema.
enum for a closed category set, format or pattern for externally validated strings, and numeric bounds when the business contract defines them.Create, inspect, or update the definition.
name and schema; add type, description, regex, model, or compliancePlan only when intentional.GET /structured-output/{id}. Do not guess from a partial name.schemaOverride=true only when intentionally changing the schema's top-level type; otherwise do not use it to bypass schema safety.Attach or detach safely.
assistantIds relationship for attachment. Read its current assistantIds, add or remove exactly the resolved assistant ID, and preserve every unrelated ID.assistantIds on the Structured Output for this operation. Re-fetch the Structured Output and assistant; verify the relationship and the assistant's artifactPlan.structuredOutputIds when returned.artifactPlan with only structuredOutputIds changed. Preserve recording, logging, transcript, scorecard, storage, and other artifact settings.Preview before broad execution.
POST /structured-output/run with one real call ID and previewEnabled: true. Supply either structuredOutputId or a transient structuredOutput, not both.Execute or backfill only when requested.
previewEnabled: false or omit it to update call artifacts. Pass no more than the currently documented maximum of 100 call IDs per request.Retrieve and verify results.
GET /call/{id} and read call.artifact.structuredOutputs[structuredOutputId].result.400, inspect the response for schema, regex, model, relationship, or run constraints. Correct one unambiguous documented issue and retry once; never repeat an unchanged request.401 or 403, stop and report authentication or permission failure.404, report the missing Structured Output, assistant, or call and identify the exact unresolved ID.409, re-read current state before deciding whether the intended relationship or update already exists.429 or 5xx, preserve the request context, report the service condition, and do not claim success.Read API Examples when implementation code is needed. Use the official TypeScript or Python Server SDK only after confirming the generated method in its current official reference; use direct REST when SDK syntax is unavailable or unstable.
Return only the sections relevant to the request: